Re: Transform input text with sed command
Quote:
Originally Posted by
vasa1
I found this:
Code:
echo "08002738cb55" | fold -w2 | paste -sd':' -
08:00:27:38:cb:55
BTW, can someone tells me what does last "-" in this command?
Re: Transform input text with sed command
Quote:
Originally Posted by
CrewDK
BTW, can someone tells me what does last "-" in this command?
man fold has this:
Code:
With no FILE, or when FILE is -, read standard input.
Edit: I forgot all about the pipe! But, as matt symes points out, man paste makes the same use of "-".
Re: Transform input text with sed command
Hi
Quote:
Originally Posted by
vasa1
man fold has this:
Code:
With no FILE, or when FILE is -, read standard input.
I think it's the paste command that's reading from standard input, vasa, as it also has that option.
Kind regards
Re: Transform input text with sed command
Quote:
Originally Posted by
matt_symes
...
I think it's the paste command that's reading from standard input, vasa, as it also has that option.
...
Oops! You're right as usual :)
I'll try and salvage my post.