07-12-2006
Quote:
Originally Posted by sajithn
Monkeys wrote:
> What I want to do is find the token starting with "C", and print it and its value > (so I'd want to print "C=3" in the example above).
So I guess it works !
Doesn't the 'token' "CAB" start with 'C'?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to delete a set of files in certain directories if there're older than a certain number of days. So I have a text file, with each line containing the directory & number of days.
The format is like this:
dirA,5
dirB,7
How do I write script to iteratively parse this text file & delete... (5 Replies)
Discussion started by: chengwei
5 Replies
2. Shell Programming and Scripting
Hello,
Im very new to PERL and as a project to work on developing my skills at PERL Im trying to parse poker hands.
Ive tried many methods however I cant get the last step.
$yourfile= 'FILENAME';#poker hands to parse
open (FILE, "$yourfile") or die $!;
@lines = <FILE>;
for (@lines) ... (1 Reply)
Discussion started by: Ek0
1 Replies
3. Shell Programming and Scripting
I have delimited-text files ( > 4GB ) and is just one line.
OS: HP-UX 11.23
Awk / cut / sed all have line_max limitations. & unable to read one line in (Buffered-mode).
Sample file:
xxxx|adsfadf|Afdsa|adsf|afds|Asdfas|ads|Afds|Asdf| .....till forever,
I want to put a carriage... (5 Replies)
Discussion started by: magedfawzy
5 Replies
4. Red Hat
I need to parse through the following file and extract the BIG02 field.
ISA*00* *00* *01*069737914 *01*044760643 ... (1 Reply)
Discussion started by: bds052189
1 Replies
5. Shell Programming and Scripting
I'll have a file with ever changing lengths depending on the report. Right now it is stored by : delimiter. My question is how do I parse through this b/c it will be changing lengths each time.
Example:
1:2:3:4:5
1:2:3:4:5:6:7:8:9
1:2:3
I want to take each one and place in newline for... (5 Replies)
Discussion started by: mhuffs90171
5 Replies
6. Shell Programming and Scripting
Hello,
I would like to convert a list of rows to a space separated line. Any ideas?
Input file:
"Administration Tools"
"Design Suite"
"Dial-up Networking Support"
"Editors"
desired output
"Administration Tools" "Design Suite" "Dial-up Networking Support" "Editors"
Thanks,... (4 Replies)
Discussion started by: jaysunn
4 Replies
7. UNIX for Dummies Questions & Answers
So, the beginning of my script will cat & grep a file with the output directed to a new file. The data I have in this file needs to be parsed, read and evaluated.
Basically, I need to identify the latest date/time stamp and then calculate whether or not it is within 15 minutes of the current... (1 Reply)
Discussion started by: hynesward
1 Replies
8. Shell Programming and Scripting
Awk gurus,
Greatly appreciate for any kind of assistance from the expert community
Input line:
abc,11.22.33.44,xyz,7-8-9-10
pqr,111.222.333.444,wxy,1-2-3
def,22.33.44.55,stu,7-8
used the gsub function below but it changes all of the "-" delimiter:
awk 'gsub("-",",")'
Desired... (4 Replies)
Discussion started by: ux4me
4 Replies
9. Shell Programming and Scripting
Hello,
I want to Replace/Remove ^M and the new line that follows it in a delimited file.
So far I have tried following and nothing seems to work for me .
Tr –d ‘\r\n’ < old.dat > new.dat -removes all the linefeed, not just the ones after a ^M.
Sed ‘/^M$/{N; s/.\n//;}’ < old.dat >... (7 Replies)
Discussion started by: bluestarmoon
7 Replies
10. Shell Programming and Scripting
Hi All,
I am new to Unix and I have one challenge and below are the details.
I have pipe delimited text file in that data has span into multiple lines instead of single line.
Sample data.
Data should be like below for entire file.
41|216|398555|77|provided complete NP outcome data ... (21 Replies)
Discussion started by: Narasimhasss
21 Replies