I have a text file with following content (3 lines)
filename : output.txt
first line:12/12/2008
second line:12/12/2008
third line:Y
I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before.
I tried using cat output.txt... (4 Replies)
Howdy!
I'm trying to automate editing of a configuration file (custom.conf for GDM). I need to find every line between a line that starts with "" and the next line that starts with "", I want to preserve that line, but then delete all the lines in that configuration section and then insert... (3 Replies)
hello all
greeting for the day
i have a text file as the following
text.xml
abcd<FIELD>123.456</FIELD>efgh
i need to replace the value between <FIELD> and </FIELD> by using awk command.
please throw some light on this.
thank you very very much
Erik (5 Replies)
Hi.
I would like to have experts help on below action.
I have text files in which page nubmers exists in form like
PAGE : 1
PAGE : 2
PAGE : 3 and so on there is other text too. I would like to know is it possible to check the last occurance of Page... (6 Replies)
My apologies if this has been answered in a previous post. I've been doing a lot of searching, but I haven't been able to find what I was looking for. Specifically, I am wondering if I can utilize sed and/or awk to locate two strings in a file, and replace everything between those two strings... (12 Replies)
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Hello,
Some time ago a helpful awk file was provided on the forum which I give below:
NR==FNR{A=$0;next}{for(j in A){split(A,P,"=");for(i=1;i<=NF;i++){if($i==P){$i=P}}}}1
While it works beautifully on English and Latin characters i.e. within the ASCII range of 127, the moment a character beyond... (6 Replies)
I have a record in below format
| msg1 | msg2 | msg3 | - | msg4
I am looking for output
mm/mon/yyyy | 01:23:59 | msg1 | msg2 | msg3 | msg4
I am trying to look in awk to make the above change
So far to avoid columns i tried
cat file | awk -F'|' '{$2=$3="";print $0}'
but i... (2 Replies)
Good Day Every one
I have a problem finding and replacing text in some large files that will take a long time to manually edit.
Example text file looks like this
#Example Large Text File
unix
linux
dos
squid
bind
dance
bike
car
plane
What im trying to do is to edit all the... (4 Replies)
Hello Everyone,
I have many files like so:
file1.txt
file2.txt
file3.txt
Within each file I have many lines of random text separated by commas like so:
abcAAA,123,defAA,456777,ghiA,789
jklB,101,mnoBBB,11211,pqrB,13111
stuCC,415,vwxCCCC,161,yzaC,718
I am trying to use SED or AWK to... (4 Replies)