10-28-2008
how to scan a sequential file to fetch some of the records?
Hi
I am working on a script which needs to scan a sequential file and fetch the row where 2nd column = 'HUB'
Can any one help me with this...
Thanks
10 More Discussions You Might Find Interesting
1. Programming
We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies
2. Shell Programming and Scripting
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies
3. Shell Programming and Scripting
Hi,
I have a task where i need to scan second column of seuential file and fetch first 3 digits of that column
For e.g. FOLLOWING IS THE SAMPLE FOR MY SEQUENTIAL FILE
AU_ID ACCT_NUM CRNCY_CDE
THHSBC001 30045678 THB
THHSBC001 10154267 THB
THHSBC001 ... (2 Replies)
Discussion started by: manmeet
2 Replies
4. Shell Programming and Scripting
Hi all,
Im stuck in findind solution to ths problem. Please guide me if u have any ideas.
I have two files.
===FILE1===
>bi|2138271|geb|AAC15885.1|precursor
MRVIAAAMLYLYIVVLAICSVGIQGIDYPSVSFNLAGAKSATWDFLRMPHDLVGEDNKYNDGEPITGNII... (25 Replies)
Discussion started by: smriti_shridhar
25 Replies
5. Shell Programming and Scripting
Dear linux experts,
I'd like to ask for your support, I've read some posts in this forum about files comparison but haven't found what I'm looking for. I need to create a sequential script to compare row-by-row one file with 34 similar files but without success so far. This is what I get:
... (2 Replies)
Discussion started by: Gery
2 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone.
I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this:
ID: 20
Name: X
Age: 19
ID: 21
Name: Z
ID: 22
Email: xxx@yahoo.com
Name: Y
Age: 19
I want to grep records that... (4 Replies)
Discussion started by: Atrisa
4 Replies
7. Shell Programming and Scripting
Hi
I have a file sequential way i.e. written in contineous mode and the Record Seperator is AM from which the record is seperated .Now to process I have to make line sequential,and more over record length is not same it varies as per the input address,
AM1234563 John Murray 24 Old streeet old... (5 Replies)
Discussion started by: vakharia Mahesh
5 Replies
8. Programming
Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX
I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Discussion started by: vrghost
7 Replies
9. Shell Programming and Scripting
I have 2 files
"File 1" is delimited by ";" and "File 2" is delimited by "|".
File 1 below (3 record shown):
Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones
Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull
Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Discussion started by: vestport
2 Replies
10. Shell Programming and Scripting
awk 'NR==FNR{arr;next} $0 in arr' /tmp/Data_mismatch.sh /prd/HK/ACCTCARD_20160115.txt
edit by bakunin: seems that one CODE-tag got lost somewhere. i corrected that, but please check your posts more carefully. Thank you. (5 Replies)
Discussion started by: suresh_target
5 Replies
LEARN ABOUT CENTOS
spi_modifytuple
SPI_MODIFYTUPLE(3) PostgreSQL 9.2.7 Documentation SPI_MODIFYTUPLE(3)
NAME
SPI_modifytuple - create a row by replacing selected fields of a given row
SYNOPSIS
HeapTuple SPI_modifytuple(Relation rel, HeapTuple row, int ncols,
int * colnum, Datum * values, const char * nulls)
DESCRIPTION
SPI_modifytuple creates a new row by substituting new values for selected columns, copying the original row's columns at other positions.
The input row is not modified.
ARGUMENTS
Relation rel
Used only as the source of the row descriptor for the row. (Passing a relation rather than a row descriptor is a misfeature.)
HeapTuple row
row to be modified
int ncols
number of column numbers in the array colnum
int * colnum
array of the numbers of the columns that are to be changed (column numbers start at 1)
Datum * values
new values for the specified columns
const char * Nulls
which new values are null, if any (see SPI_execute_plan for the format)
RETURN VALUE
new row with modifications, allocated in the upper executor context; NULL only if row is NULL
On error, SPI_result is set as follows:
SPI_ERROR_ARGUMENT
if rel is NULL, or if row is NULL, or if ncols is less than or equal to 0, or if colnum is NULL, or if values is NULL.
SPI_ERROR_NOATTRIBUTE
if colnum contains an invalid column number (less than or equal to 0 or greater than the number of column in row)
PostgreSQL 9.2.7 2014-02-17 SPI_MODIFYTUPLE(3)