|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
sed : help please & thanks :)
I've got this big file and I need to use the sed in one command to do the following ....
1) delete the first 3 lines 2) delete the last line 3) replace nulls or tabs with comma ... is this possible in one command? Thanks ![]() |
|
#2
|
|||
|
|||
|
there a lot of books
sed '$d;1,3d;s/[0T]/,/g' input >output T is litterally a tab char |
|
#3
|
|||
|
|||
|
Quote:
That didn't do it exactly for me (cygwin in win2k) but: sed '$d;1,3d;s/[\x00\t]/,/g' input >output or sed '$d;1,3d;s/[\x00T]/,/g' input >output (where T is literally a TAB) does. I assume 0 was meant to be literally a null x'00' but it doesn't actually replace nulls when I try it. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > sed : help please & thanks :) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|