coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cat -n with different format?


From: Peng Yu
Subject: cat -n with different format?
Date: Thu, 22 Dec 2011 11:14:33 -0600

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]