10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Need help on replacing every second instance of delimeter.
I want every second "," to replace with "|"
I tried like below
echo $var| sed 's/,/|/2'
But, it's not working.
... (4 Replies)
Discussion started by: Sumanthsv
2. Shell Programming and Scripting
Hi Everyone, I have the below information from a log file:
WRT_8036 Target: TGT_1_TAB (Instance Name: )
WRT_8039 Inserted rows - Requested: 3929 Applied: 0 Rejected: 3929 Affected: 0 Mutated from update: 3929
WRT_8041 Updated rows ... (7 Replies)
Discussion started by: galaxy_rocky
3. Shell Programming and Scripting
Suppose you have a line like this:
The line should be converted like this:
Was wondering how to do that using shell script.
Please use tags where appropriate, thank you (4 Replies)
Discussion started by: saurabhkoar
4. Shell Programming and Scripting
test.txt is the dynamic file but some of combination are fix
like below are the lines
;wonder_off = disabled
wonder_off = disabled
the test.txt can content them in any order
;wonder_off = disabled
wonder_off =... (5 Replies)
Discussion started by: SilvesterJ
5. Shell Programming and Scripting
I was told a way to do this with awk earlier today but is there a way with sed to specify the last instance of a character on a line?
You will know what character you're looking for but there could be none or one hundred instances of it on a line say and you ONLY want to specify the last one for... (3 Replies)
Discussion started by: Bashingaway
6. Shell Programming and Scripting
I have a record like the one given below.
010000306551~IN ~N~ |WINDWARD PK|Alpharetta|
If ~ is present more than instance in a line,then I need to delete those instances.
I am working in Solaris (7 Replies)
Discussion started by: prasperl
i have string var1=NN. Based on conditions, i have to change this first N to Y or second N to Y and send the details to other process. How to do that? This is a linux machine.
Selva (1 Reply)
Discussion started by: bharathappriyan
8. Shell Programming and Scripting
Hi, I've been trying to figure this one out and found a post about this on the forum here but the solution didn't seem to work for me. Basically what I have is a file that looks something like:
I want to substitute for the 0 but what I want to... (9 Replies)
Discussion started by: eltinator
9. Shell Programming and Scripting
I have file with following content
I want to replace nth "TEST" with "OK" using... (4 Replies)
Discussion started by: uttamhoode
10. Shell Programming and Scripting
Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Discussion started by: IronHorse7