Hi,
I justs started learning Unix on my own.
I have a question:
What command can I use when I need to read in part of the file into another file?
I remember I saw it somewhere but I don't know what it is.
Thanks
Hi,
I justs started learning Unix on my own.
I have a question:
What command can I use when I need to read in part of the file into another file?
I remember I saw it somewhere but I don't know what it is.
Thanks
#get first lines of a file:
head filename > newfile
#get last lines of a file
tail filename > newfile
#get lines that have certain text
grep "certain text" filename > newfile
.....
''after you apply the sed commands try to redirect the output to temp file like this''
sed -n '6,9p' inuput.fle > temp.fle
then depending on which line youre going too lets say line 5.. of the other file..
sed '4 r temp.fle' other.fle > new.file
mv new.fle other.fle
this will take lines 6 thru 9 of the first file and dump onto line 5 of the other file...
hope that helps..!
moxxx68:p