Discussion:
why is this result?
ishare
2013-03-14 13:42:59 UTC
Permalink
I have a file named by "1", its content is

xyz
123
dfd
xyzdfdf


when I typed : sed 'p' 1 .
it print out :
xyz
xyz
123
123
dfd
dfd
xyzdfdf
xyzdfdf

Obviously ,every line has been duplicated once ,why is this result?



thanks!
Aurelio Jargas
2013-03-14 17:23:47 UTC
Permalink
sed by default already print every line to the output. When you use the 'p'
command, you're telling sed to print each line again.
Post by ishare
I have a file named by "1", its content is
xyz
123
dfd
xyzdfdf
when I typed : sed 'p' 1 .
xyz
xyz
123
123
dfd
dfd
xyzdfdf
xyzdfdf
Obviously ,every line has been duplicated once ,why is this result?
thanks!
------------------------------------
--
Yahoo! Groups Links
--
Aurelio | www.aurelio.net | @oreio


[Non-text portions of this message have been removed]
Loading...