10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I am writing a shell script with following requirement:
1. I have one input file as below
CHE01,A,MSC,INO
CHE02,B,NST,INC
CHE03,C,STM,INP
2. In shell script I have predefined array as below:
Array1={A, B, C}
Array2= {U09, C04, A054} (6 Replies)
Discussion started by: angshuman
6 Replies
2. Shell Programming and Scripting
hi,
I am having a file where in i need to replace a particular coulmn of certain specific line only
for eg:
a|xx|yy|xx
b|aaa|qq|1234
c|11|aa|qq
i need to replace 2nd line
a|xx|yy|xx
b|aaa|REPLACE|1234
c|11|aa|qq
awk 'BEGIN{OFS=FS="|"}{print $3}'= 'REPLACE' {print}' (3 Replies)
Discussion started by: rohit_shinez
3 Replies
3. Shell Programming and Scripting
I need to be able to search for a string in the first column and if that string exists than replace the nth column with "-9.99".
AW12000012012 2.38 1.51 3.01 1.66 0.90 0.91 1.22 0.82 0.57 1.67 2.31 3.63 0.00
AW12000012013 1.52 0.90 1.20 1.34 1.21 0.67 ... (14 Replies)
Discussion started by: ncwxpanther
14 Replies
4. Shell Programming and Scripting
Hello All,
I am trying to replace a column within a line that has a certain fruit name. I have a bunch of line such as:
apple:green:5cents:CA
pineapple:red:4cents:FL
orange:green:6cents:HI
...and change the third column in the specific line that matches the $fruitname variable to... (2 Replies)
Discussion started by: techieg
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I would like to use sed to replace NA to x ('s/NA/x/g'), but only in the 5th column of the space delimited text file, nowhere else. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
6. Shell Programming and Scripting
Find in first column and replace the line with Awk, and output new file
File1.txt"2011-11-02","Georgia","Atlanta","x","",""
"2011-11-03","California","Los Angeles","x","",""
"2011-11-04","Georgia","Atlanta","x","x","x"
"2011-11-05","Georgia","Atlanta","x","x","" ... (4 Replies)
Discussion started by: charles33
4 Replies
7. Shell Programming and Scripting
I have a csv file with occasional multiple entries in the second column.
111111,104,07-24-2011,3.15,N,
222222,020 140,07-24-2011,10.00,N,I want the result
111111,104,07-24-2011,3.15,N,
222222,020,07-24-2011,10.00,N,
222222,140,07-24-2011,10.00,N,
I know I can get the output of the second... (5 Replies)
Discussion started by: ffdstanley
5 Replies
8. Shell Programming and Scripting
Hi:
I have a file as below:
#LINE 3841.0
14663859 358272.0 676600.0 20.00 1510.00
91.00 1534.00
215.00 1624.00
374.00 1688.00
14663899 ... (2 Replies)
Discussion started by: total_ysf
2 Replies
9. Shell Programming and Scripting
Replace these if the column is -
p = q
q = p
r = s
s = r
input
- PQRSSP
+ PQRS
output
- QPSRRQ
+ PQRS
Some thing,like (5 Replies)
Discussion started by: bumblebee_2010
5 Replies
10. UNIX for Dummies Questions & Answers
I want to replace this line : "test compare visible] true" and make it "#test compare visible] true".
How can I do it ? And it should be checked in many sub folder files also. (6 Replies)
Discussion started by: manoj.b
6 Replies