I would like to store each record in the array word by word. Ideally I want to loop through the file and store each word of the record in array and manipulate and print it again in record by record ((ie one array per record and as I am looping through I can do the manipulation ,print the new record and use the same array for next record) . After doing the manipulation , may be we can use a new array to store the updated record information and print it. In this case there will be 2 arrays and for each record it can be reused. Hope I haven't confused you.
And I am using Korn Shell.
Last edited by ashwin3086; 08-06-2013 at 12:15 PM..
Hi all,
I'm quite new to unix and hope that someone can help me on this.
I'm using csh.
Below is what i intend to do.
1. I stored some data in a file.
2. I intend to read the file line by line and store each line of data into a variable, so that i can used it later.
Anyone have any... (4 Replies)
i have this line
my,name,is,john
stored in a file d.sh and i wish to print the line as string..but im getting word by word...have tried this.........
for in $(cat $d.sh);
do
echo $i
done
but this is giving me
my
name
is
john (6 Replies)
Assume I have a text file as below:
me
con pi
ind ken
pras ur
me
con rome
ind kent
pras urs
pintu
con mys
ind pan
pras ki
con kit
ind sys
My requirement,
I need to search for "con rome" and if exists, then print 4th word from rome, i.e in above example, since "con rome"... (4 Replies)
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Hi people;
i want to read the last word of the 14th line of my file1.txt. Here is the EXACT 14th line of the file.
250 SectorPortnum=3,AuxPortInUngo=2,PortDeviceGroup=1,PortDeviceSet=1,PorDevice=1 20 >>> Set.
i have to get the word Set. how can i call it and also how... (3 Replies)
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Hi, I need a script to read last word of the line and out put in some temp file.
i
it can contain any word like:
My name is Harry.
or
My zip code is 24490
or it can be
My secret code is 024H
I just need last word of the line (Harry, or 2440 or 024H)
Thanks for the posts below.... (10 Replies)
Hi,
I wish to write a piece of code to read lines of the flat file and cut each lines of record to a variable, then use this variable to pass as an parameter of a Sybase stored procedures, if there are 5 lines of record from the text file, then this stored procedures will be called 5 times.... (8 Replies)
Hi All,
Hope you guys had a wonderful weekend
I have a scenario where in which I have to read a file line by line
and check for few words before redirecting to a file
I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
I have a file: file.txt, which contains the following data in it.
This is a file, my name is Karl, what is this process, karl is karl junior, file is a test file, file's name is file.txt
My name is not Karl, my name is Karl Joey
What is your name?
Do you know your name and... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies
LEARN ABOUT PHP
px_retrieve_record
PX_RETRIEVE_RECORD(3)PX_RETRIEVE_RECORD(3)px_retrieve_record - Returns record of paradox databaseSYNOPSIS
array px_retrieve_record (resource $pxdoc, int $num, [int $mode])
DESCRIPTION
This function is very similar to px_get_record(3) but uses internally a different approach to retrieve the data. It relies on pxlib for
reading each single field value, which usually results in support for more field types.
Note
This function is only available if pxlib >= 0.6.0 is used.
PARAMETERS
o $pxdoc
- Resource identifier of the paradox database as returned by px_new(3).
o $num
- The record number is an artificial number counting records in the order as they are stored in the database. The first record has
number 0.
o $mode
- The optional $mode can be PX_KEYTOLOWER or PX_KEYTOUPPER in order to convert the keys into lower or upper case. If $mode is not
passed or is 0, then the key will be exactly like the field name. The element values will contain the field values. NULL values
will be retained and are different from 0.0, 0 or the empty string. Fields of type PX_FIELD_TIME will be returned as an integer
counting the number of milliseconds starting at midnight. A timestamp is a floating point value also counting milliseconds start-
ing at the beginning of julian calendar.
RETURN VALUES
Returns the $num'th record from the paradox database. The record is returned as an associated array with its keys being the field names.
SEE ALSO px_get_record(3).
PHP Documentation Group PX_RETRIEVE_RECORD(3)