12-08-2008
cat file | awk '/PAID,1/ { print "paid";} /PAID,0/ {print "non-paid";} /RESP:11000003/ {print "not exists"}'
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a file(old file) with names in it like
Jolly Mirani
Han Lee
stuart Lloyd
I want string to be added to these names . New file should look like
'jolly mirani'
'han lee'
'stuart lloyd'
I tried using sed command but doesn't work for string but it do work for paranthesis. Can some one... (3 Replies)
Discussion started by: Jolly
3 Replies
2. Shell Programming and Scripting
Hai,
Just want to print only alphanumeric in a file
ex:-
fdsdsklf#@^%$#hf
output:- fdsdsklfhf
plz, help me:o (5 Replies)
Discussion started by: balan_mca
5 Replies
3. Shell Programming and Scripting
Hello All,
I have a big file about 1000 lines. Now i am trying to grep a particular string and printing the lines from the string.
say for example in 500th line i have the date as "Mon Wed 14 20:15:24 2010". now i in my case i need to grep the combination of the strings "Mon Wed 14" and the... (7 Replies)
Discussion started by: intiraju
7 Replies
4. Shell Programming and Scripting
Hi,
I have two files. 1st file has 1 column (huge file containing ~19200000 lines) and 2nd file has 2 columns (small file containing ~6000 lines).
#################################
huge_file.txt
a
a
ab
b
##################################
small_file.txt
a 1.5
b 2.5
ab ... (4 Replies)
Discussion started by: AshwaniSharma09
4 Replies
5. Shell Programming and Scripting
I have 2 files that I would need from one file the 3rd column and put into the second file. Preferably in KSH . For example file one has
file1:
Column 1 Column 2 Column 3 Column 4 Column 5
file2:
Column 1 Column 2 Column 3 Column 4 Column 5
So take Column 3 and put into file1 making it... (4 Replies)
Discussion started by: bombcan1
4 Replies
6. Shell Programming and Scripting
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies
7. Shell Programming and Scripting
Hi
I have in put file A.txt
ABCDE1 JFHFJFJF3 1 1 SC1 12/10
ABCDE2 JFHFJFJF5 1 1 SC1 12/10
ABCDE3 JFHFJFJF5 1 1 SC1 12/10
ABCDE4 JFHFJFJF6 1 1 SC1 12/10
I want output in .csv with header:
Name SUb_N x y No Board
ABCDE1 JFHFJFJF3 1 1 SC1 12/10
ABCDE2 JFHFJFJF5 1 1 SC1... (7 Replies)
Discussion started by: pareshkp
7 Replies
8. Shell Programming and Scripting
Hello
Here is my input:
SU3902 SU3902A NS29C (10) (00) Q1J1 0
SU3902 SU3902B VLR05 (20) (02) Q2H1 4
SU3902 SU3902C NBR22 (30) (06) Q3R5 8
SU3904 SU39047 NSV19 (11) (09) Q4k6 2
SU3904 SU39048 LB231 (12) (05) Q5k1 6
SU3904 SU39049 11VLT (13) (08) Q10C1 10
SU3904 SU3904A 25R05 (15) (06)... (3 Replies)
Discussion started by: pareshkp
3 Replies
9. Shell Programming and Scripting
Consider i have the below data in my log file.
i want to grep using "Monday" and "Working"
So the only output i expect is
Can you help me with the grep query for Sun Sparc ?
Usage: grep -hblcnsviw pattern file . . . (8 Replies)
Discussion started by: mohtashims
8 Replies
10. Shell Programming and Scripting
Hi have a large spreadsheet which has 4 columns
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96034 Storage Mgmt Team
APM00111803814 server_2 96152 GWP... (6 Replies)
Discussion started by: kieranfoley
6 Replies