1834486 Members
3105 Online
110067 Solutions
New Discussion

Re: Scripting

 
SOLVED
Go to solution
Arman Mahboobi
Advisor

Scripting

Hi,
I would like to display all the contents of a particular file apart from the first field in the file. Cut does not help me and I am not familiar with Awk, could anyone help please.
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Scripting

What's the delimiter of the file? Can you give us a few sample lines?
Arman Mahboobi
Advisor

Re: Scripting

The first field is a pager number followed by a space and text after that.
Patrick Chim
Trusted Contributor
Solution

Re: Scripting

Hi,

Just type,

cat | cut -f2- -d' ' >

Regards,
Patrick
H.Merijn Brand (procura
Honored Contributor

Re: Scripting

Patrick, why use 'cat as an extra unneeded process? Use input redirection: '< file'

perl solution

# perl -pe's/^\s*\d+\s*//' file
Enjoy, Have FUN! H.Merijn
Patrick Chim
Trusted Contributor

Re: Scripting

Hi,

Sorry about that,

it should be

cut -f2- -d' ' >

Regards,
Patrick
Arman Mahboobi
Advisor

Re: Scripting

Does not matter, either way will work.

Thankyou very much!