10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
sed /'1-2'/&^/ filename
suppose there is a file containing three lines , how do we do delete the word from each line?
hyter efr frf
rerfer efe ewd
cdcf evrfgf erfv
the output has to look like
frf
ewd
erfv (2 Replies)
Discussion started by: Rajeev Nukala
2 Replies
2. UNIX for Dummies Questions & Answers
I have a file from which I am trying to delete a particular word on a particular line.
NEW
NEW
/v/engine
NEW
/ifs/list
NEW
/ifs/vdrome
NEW
I am trying to delete the first line only if it contains the word NEW. I am also trying to delete the last line only if it contains the word NEW. I... (11 Replies)
Discussion started by: newbie2010
11 Replies
3. Shell Programming and Scripting
Hello,
I'm new to this forum. I've been doing a lot of sed work lately and have found many useful tips on this forum. I've hit a roadblock in a project, though, and could really use some help.
I have a text file with many lines like the following, i.e., some lines begin with a single word... (3 Replies)
Discussion started by: paroikoi
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have gone through may posts and dint find exact solution for my requirement.
I have file which consists below data and same file have lot of other data.
<MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'>
<MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
Discussion started by: tmalik79
11 Replies
5. Shell Programming and Scripting
Hi there,
I'd like to delete the beginning of a line up until it finds a certain word or character string: in this case, I'd like to delete each line up to the word "mounting".
Thanks ;)
Susan (12 Replies)
Discussion started by: kitykity
12 Replies
6. Shell Programming and Scripting
I've been trying this, and can't get it right. I want to put a line break before a word, but only if it's *not* the last word in the line. So if the break work was "fish," then...
We want to fish tomorrow
...would become...
We want to
fish tomorrow
...but this line would remain... (3 Replies)
Discussion started by: estebandido
3 Replies
7. Shell Programming and Scripting
I have parsed a curl download with sed commands. I would also like to move the last line in the output file to the top. Can I use sed for this? (3 Replies)
Discussion started by: jostber
3 Replies
8. Shell Programming and Scripting
Hi,
The file format is like the following.
timestamp=2008-02-28-23.50.29.550675;category=CONTEXT;audit event=CONNECT;
event correlator=2;
database=CURDOMS;userid=inst3;authid=INST3;
origin node=0;coordinator node=0;
application id=AC122081.FA97.054468155029;application... (2 Replies)
Discussion started by: missyou
2 Replies
9. UNIX for Dummies Questions & Answers
Hey All,
On commad promt of a shell..
How can we move our cursor word by word.
Like Ctrl+A takes to the starting of the command...
Any shortcut like that..?
Thanks
pbsrinivas (1 Reply)
Discussion started by: pbsrinivas
1 Replies
10. Shell Programming and Scripting
Hello !
I have a result of ls command in a file:
file1 file2 file3.out file4.pdf file5
they all are separated by space.
I need to put them on a separate line
example:
file1
file2
file3.out
file4.pdf
fil35
i tried
sed 's/ /\n/g' inputfile > outputfile
but did not help (3 Replies)
Discussion started by: hemangjani
3 Replies