Search Results

Search: Posts Made By: xb88
14,248
Posted By xb88
Thanks to both System Shock and vish indian! It...
Thanks to both System Shock and vish indian! It seems there is no easy way for sed to do it. I have to use awk, perl, or something else ...
14,360
Posted By xb88
I agree - it's up to you. I like to use cat to...
I agree - it's up to you. I like to use cat to pipe everything to next command. The above command is the same as following:

sed -n -e 's/.*\([0-9]\{10\}\).*/\1/p' t1.txt t2.txt t3.txt t4.txt t5.txt
4,496
Posted By xb88
Sorry, I missed the details in original post - if...
Sorry, I missed the details in original post - if it's one character, you have to use the octal.
14,360
Posted By xb88
send the contents of the files (1 -5) to sed...
send the contents of the files (1 -5) to sed command for processing.
14,360
Posted By xb88
Try this: your_variable=`cat t1.txt t2.txt...
Try this:

your_variable=`cat t1.txt t2.txt t3.txt t4.txt t5.txt | sed -n -e 's/.*\([0-9]\{10\}\).*/\1/p'`
4,496
Posted By xb88
try this: cat <your_file_name> | sed -e...
try this:

cat <your_file_name> | sed -e 's/\^@//g' > output.txt
14,248
Posted By xb88
Use sed to merge multiple lines
Hi all:

I have a file in which the contents are as following:

...
This is a test
ONE
TWO
Hello, world!
XXX YYY CCC
test again
three, four
five
six
seven
world
AAA BBB QQQ
test...
Showing results 1 to 7 of 7

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