Search Results

Search: Posts Made By: roblrob
5,935
Posted By roblrob
sed...
sed '/\(.*\)/{G;s/\(.*\)\(\n\)/\1\2extra\1\2extraextra\1/;}' file
5,935
Posted By roblrob
Just check my HP box and got the same result that...
Just check my HP box and got the same result that you did. Try this on your sed:

sed '/\(.*\)/{G;s/\(.*\)\(\n\)/\1\2extra\1/;}' file

or

echo files|sed...
5,935
Posted By roblrob
check that the \ is in front on the n sed...
check that the \ is in front on the n

sed 's/\(.*\)/\1\nextra\1/'
5,935
Posted By roblrob
Hmmm: file: line1 line2 line3 cat...
Hmmm:

file:
line1
line2
line3

cat file|sed 's/\(.*\)/\nextra\1/'>newfile

cat newfile
line1
extraline1
line2
extraline2
line3
extraline3

Maybe I don't understand what you actually...
5,935
Posted By roblrob
try: sed 's/\(.*\)/\1\nextra\1/'
try:
sed 's/\(.*\)/\1\nextra\1/'
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy