Hi All,
I am trying to replace a certain value from one place in a file . In the below file at position 35 I will have 8 I need to modify all 8 in that position to 7
I tried
awk '{gsub("8","7",$35)}1' infile > outfile ----> not working
sed -i 's/8/7'g' infile --- it is replacing all... (3 Replies)
I'm trying to make an awk script to compare values I've set as var1, var2, and var3 earlier in the script to the values in the userinputted column of four text files called Node1.txt, Node2.txt, Node3.txt, and Node4.txt and then replace the values in that userinputted column with either ttt or gcc,... (8 Replies)
I have one file as it has the following format
File1
S No Site IP Address
1 Australia 192.168.0.1/26
2 Australia 192.168.0.2/26
3 Australia 192.168.0.3/26
I need awk/sed command to replace the column2 value ( under Site) with some other... (8 Replies)
Hi, I have the following data:
2860377|"DATA1"|"DATA2"|"65343"|"DATA2"|"DATA4"|"11"|"DATA5"|"DATA6"|"65343"|"DATA7"|"0"|"8"|"1"|"NEGATIVE"
32340377|"DATA1"|"DATA2"|"65343"|"DATA2"|"DATA4"|"11"|"DATA5"|"DATA6"|"65343"|"DATA7"|"0"|"8"|"1"|"NEG-DID"... (3 Replies)
Dear all,
I have a file1.pdb in pdb format and a dat file2 containing values, corresponding to the atoms in the pdb file. these values (file2.dat) need to be in the column instead of the 0.00 (file1) values for each atom in file1.pdb .(the red values must be replaced by the blue ones,in order)... (11 Replies)
Hello,
I have a file with four columns and I would like to replace values in the second column only.
An arbitrary example is:
100 A 105 B
200 B 205 C
300 C 305 D
400 D 405 E
500 E 505 F
I need to replace the second column as shown below:
... (4 Replies)
$ cat log.txt
Name Age Sex Lcation nfld alias xsd
CC 25 M XYZ asx KK Y
BB 21 F XAS awe SS N
SD 21 M AQW rty SD A
How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column?
so that the final output will become:
Name Age Sex... (10 Replies)
I have the below file ...where some of the column values should replaced with desired values ....below file u can find that 3 column where ever 'AAA' comes should replaced with ' CC '
NOTE : we have to pass the column number ,AAA,CC (modified value) as the parameters to the code.
... (6 Replies)
Hi All,
I have a file which has data in following format:
"Body_Model","2/1/2007","2/1/2007"
"CSCH74","0","61"
"CSCS74","0","647"
"CSCX74","0","3"
"CSYH74","0","299"
"CSYS74","0","2514"
"CSYX74","0","3"
"Body_Model","3/1/2007","3/1/2007"
"CSCH74","0","88"
"CSCS74","0","489"... (3 Replies)