I was trying to grep a variable with one space in my file:
questionlabel=Q1
more job.tex
Q1 pear
Q1A applie
grep -i "$questionlabel\ " job.tex > tmp
But I keep getting :
Q1 and Q1A both in my tmp
Thanks!!!! (4 Replies)
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)
Hi,
I have the calculations which return me infinity (inf), -inf, other very larger number when I printed them out.
I did try to insert some control condition not to print these out if the above condition is met. The code I implemented is something like:-
for (i=0;i<=1000;i++){
... (3 Replies)
Hi All,
I have two files say file1 and file2.
I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions .
Could you pls... (3 Replies)
Hi
I would like to replace one of our script, and add some pre-checking for the input file before running the command, but I bumped into the following issue:
Original command: use < input.txt
I cannot modify the original command, but I created the useit script which would be called as... (2 Replies)
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)
Could any one help me to compare the date value say at 10th column with sysdate (i.e current date) and if diffrence is more than 50 days then filter them out from the file. The file contain 10000 records.
head file
00971502657744 A671FAHP2EW8BG1369172011HRWS contact information ... (6 Replies)
Hi,
I am trying to create a text file from data retrieved from a query.The data retrieved is having this character '^L' at regular intervals of the data.
How can i eliminate this, Please find below the sample data.
I tried sed -e "s/\^L//g" to convert it, but with no luck
^LCODE*SERIAL... (11 Replies)
Hi I am new to shell programming in unix
Please if I can provide help.
I have a file structure of a header record and "N" detail records.
The header record will be the total number of detail records
I need to split the file in 2:
One for the header
Another for all detail records
Could... (1 Reply)