Stripping first few characters from string using awk

Im parsing a text file and pulling out a number of fields which I am printing.
All is well!

I now want to strip the first 7 characters from the first field before I print it.

How can I do that please?
stummjAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Hi,
use  substr($1,8)
where the format is 'substr(string,start, [length]
[length] can be omitted, it then defaults to the length of the remaining string.
wmp
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
woolmilkporcCommented:
... typo!
Format is 'substr(string,start, [length])
e.g. awk '{print substr($1,8)}' [inputfile]
0
stummjAuthor Commented:
Your first offering worked just fine thank you!
Do you happen to have a link to an awk langauge reference? I could have looked substr up myself, but I didnt realise awk supported functions like that
0
woolmilkporcCommented:
Glad I could help!
Well, the first source of information is 'man awk'. There is already a lot of useful stuff in it.
Next, two nice tutorials:
http://www.vectorsite.net/tsawk.html
http://packetstormsecurity.nl/programming-tutorials/awk/node2.html 
- even Oracle has one:
http://www.oracle.com/technology/pub/articles/dulaney_awk.html 
- and there is the GNU awk Users Guide:
http://www.gnu.org/software/gawk/manual/gawk.html
 
Google for more!
HTH
Cheers
wmp
 
 
0
stummjAuthor Commented:
I very much appreciate all your help.
Many thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.