On Mon, 2007-06-11 at 09:45 -0500, Robert C Wittig wrote:
> Michael Sullivan wrote:
> > Is there an easy way to delete a set number characters from the
> > beginning of a line, or do I just need to write a perl script to do
> it?
> >
> >
>
> See 'man tr' ...might be what you are looking for.
My actual application for this is thus: I have a file of information in
this format. It is diff output:
< -r--r--r-- michael/users 1204048 2007-05-25 13:34
home/michael/.evolution/cache/tmp/evolution-tmp-g9stix/voice-message.wav
< -rw------- michael/users 65536 2007-05-22 22:32
home/michael/.evolution/cert8.db
< -rw------- michael/users 16384 2007-05-22 22:32
home/michael/.evolution/key3.db
< drwx------ michael/users 0 2007-05-25 07:42
home/michael/.evolution/memos/local/system/
< -rw-r--r-- michael/users 110 2007-05-25 07:42
home/michael/.evolution/memos/local/system/journal.ics
< -rw------- michael/users 3 2007-05-22 22:32
home/michael/.evolution/camel-cert.db
< drwx------ michael/users 0 2007-05-26 07:25
home/michael/.config/gtk-2.0/
< -rw-r--r-- michael/users 135 2007-05-26 07:25
home/michael/.config/gtk-2.0/gtkfilechooser
< -rw------- michael/users 36280 2007-05-25 13:35
home/michael/.realplayerrc
< -rw-r--r-- michael/users 9502 2007-05-26 07:11
home/michael/Checkbook.gnumeric
< drwx------ michael/users 0 2007-05-25 09:18
home/michael/.keychain/
< -rw------- michael/users 112 2007-05-25 07:41
home/michael/.keychain/camille-sh
< -rw------- michael/users 82 2007-05-25 07:41
home/michael/.keychain/camille-csh
< -rw------- michael/users 75 2007-05-25 07:41
home/michael/.keychain/camille-sh-gpg
< -rw------- michael/users 59 2007-05-25 07:41
home/michael/.keychain/camille-csh-gpg
< -rw------- michael/users 138 2007-05-25 07:41
home/michael/.keychain/camille-fish
< -rw------- michael/users 88 2007-05-25 07:41
home/michael/.keychain/camille-fish-gpg
< -rw-r--r-- michael/users 11381 2007-01-18 22:14
home/michael/.xscreensaver
< drwxr--r-- michael/users 0 2007-05-25 00:50
home/michael/.linuxcounter/
< -rw-r--r-- michael/users 370 2007-05-25 00:50
home/michael/.linuxcounter/camille
What I need to do is extract everything after the string 'home'. Only
that. I tried using `cat diff.txt | cut -c 51-`, but it seems that the
filename in the listing does not always start in column 51. Is there a
way I can extract only the filename from the listing? I tried man tr,
but I didn't understand it...
To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be
removed.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/LINUX_Newbies/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/LINUX_Newbies/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/