help with sed

Joep L. Blom jlblom at neuroweave.nl
Thu Jun 28 20:44:08 UTC 2012


On 28-06-12 08:21, Nils Kassube wrote:
>
>
> Two remarks:
> - I don't see a reason to use "1,1s…" for the first command, "1s…"
> should suffice.
> - The backslash for the fifth command is not needed because the
> expression is now inside quotes.
>
> But of course that doesn't explain why line 1 is unchanged. I would
> assume that the expressions you used don't match, e.g. because the
> original line uses upper case instead of the lower case in your
> expression or extra space characters somewhere. If you don't find the
> reason, could you post the original first line of the file?
>
>
> Nils
>
Nils,
Thanks for the reply. You made me look more carefully to the first line 
(I used hexedit to look at the key-codes) and silly me had not detected 
  the spaces in the text. Now it works perfect.
@Normand,
Thanks for the suggestion and the complete realization for my problem. 
However, I'm as Johnny Rosenberg, I have never mastered AWK and I don't 
need that very much. When I have more complex scripts to make I use perl 
instead of bash. There I know how to manipulate strings.
Everybody, thanks for the help anyway,
Joep





More information about the ubuntu-users mailing list