truncate until delimiter

Karl Auer kauer at biplane.com.au
Sun Feb 28 14:23:49 UTC 2010


On Sun, 2010-02-28 at 15:13 +0100, Vadkan Jozsef wrote:
> I Want to truncate this output, until the first "/":

Try using "cut".

To cut a line at the first slash, use

   cut -d/ -f1

See "man cut" for more info.

You might also want to check out "man basename"...

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)                   +61-2-64957160 (h)
http://www.biplane.com.au/~kauer/                  +61-428-957160 (mob)

GPG fingerprint: B386 7819 B227 2961 8301 C5A9 2EBC 754B CD97 0156
Old fingerprint: 07F3 1DF9 9D45 8BCD 7DD5 00CE 4A44 6A03 F43A 7DEF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100301/ce08387f/attachment.sig>


More information about the ubuntu-users mailing list