RE: cat -n with different format?

2012-01-02 Thread Voelker, Bernhard
Peng Yu wrote: > Hi, > > I want to change how the line number is displayed > > ~$ echo a | cat -n > 1a > > For example, I want it to be shown as > > 1:a > > Although this can be easily done in anything other scripting language, > I'm wondering if there is an even easier way to get

Re: cat -n with different format?

2011-12-22 Thread Eric Blake
On 12/22/2011 10:14 AM, Peng Yu wrote: > Hi, > > I want to change how the line number is displayed > > ~$ echo a | cat -n > 1a > > For example, I want it to be shown as > > 1:a > > Although this can be easily done in anything other scripting language, > I'm wondering if there is a

Re: cat -n with different format?

2011-12-22 Thread Erik Auerswald
Hi, On 12/22/2011 06:14 PM, Peng Yu wrote: I want to change how the line number is displayed ~$ echo a | cat -n 1 a For example, I want it to be shown as 1:a Although this can be easily done in anything other scripting language, I'm wondering if there is an even easier way to get it do

cat -n with different format?

2011-12-22 Thread Peng Yu
Hi, I want to change how the line number is displayed ~$ echo a | cat -n 1 a For example, I want it to be shown as 1:a Although this can be easily done in anything other scripting language, I'm wondering if there is an even easier way to get it done with cat. -- Regards, Peng