10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
2. Shell Programming and Scripting
Hi,
I have a file with certain lines in it.
i want to swap every occurance of word A with B and every occurrance of word B with A.
Example
file.txt
Unix is a great OS.
Linux support graphical user intrface.
unix and linux are both same.
Output
file.txt
Linux is a great OS.
Unix... (5 Replies)
Discussion started by: Little
5 Replies
3. Shell Programming and Scripting
Hi
I use sed comnand to remove occurance of one workd from a line.
However I need to removed occurance of dufferent words in ne line.
Original-1 Hi this is the END of my begining
Comand sed s/"END"/"start"/g
Output-1 Hi this is the start of my beginig
But I have more... (9 Replies)
Discussion started by: mnassiri
9 Replies
4. Shell Programming and Scripting
Hi. I have to swap the first and the third word in all lines of a txt file using sed.
Separators between words are: any charachter, except intervall.
I hope, you'll understand what I want to do. my english is not so good, sorry for that:) (10 Replies)
Discussion started by: T720
10 Replies
5. Shell Programming and Scripting
Hi,
I think it is possible with sed, but I'm not sure...
I've a file that contains some text and filenames:
gtk-media-pause | CB60471-05 - Gilbert, Brantley - Country Must Be Country Wide.zip | 8175 | /home/floris/Muziek/Karaoke/1341838939/CB60471-05 - Gilbert, Brantley - Country Must Be... (2 Replies)
Discussion started by: jkfloris
2 Replies
6. Shell Programming and Scripting
Hi all,
I want to make an script using sed that removes everything between 'begin' (including the line that has it) and 'end1' or 'end2', not removing this line.
Let me paste an 2 examples:
anything before
any string begin
few lines of content
end1
anything after
anything before
any... (4 Replies)
Discussion started by: meuser
4 Replies
7. UNIX for Advanced & Expert Users
Hi,
I have to swap two consecutive line using sed in a file.
My text to swap is available in the file x.pl
#Create & map a common work library
if (!(-e "../work"))
{
system ("vlib work ../work");
system ("vmap work ../work");
}
system ("vsimsa -do thiagu_dec.do");
In this i... (6 Replies)
Discussion started by: adharmalingam
6 Replies
8. Shell Programming and Scripting
Hello all
i know it is pretty hard one but you will manage it all
after noticing and calculating i find a rhythm for the file i want to edit
to copy the last 12 characters in line but the problem is to add after first 25 characters in same line
in other way too copy the last 12 characters... (10 Replies)
Discussion started by: princesasa
10 Replies
9. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
10. Shell Programming and Scripting
Please any one can help me how to swap first 2 words in every line in a file using sed
Thankk you (4 Replies)
Discussion started by: web123
4 Replies