The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Small question regarding SSH Legend986 UNIX for Dummies Questions & Answers 2 12-17-2007 05:25 AM
A small minix question sasa Shell Programming and Scripting 2 05-21-2007 05:20 PM
How to use awk substr ? sabercats Shell Programming and Scripting 1 02-10-2006 07:01 PM
small question of echo | grep command kfad Shell Programming and Scripting 5 05-02-2005 11:12 AM
small question janr Shell Programming and Scripting 9 09-20-2002 02:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-21-2006
amon amon is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 71
small question regarding substr()

Hello..

I am doing some awk-ing and among all I use substr inside it..

I have: ....substr($0,60,37)

meaning as U all know take from 37 char. from point 60..

can I put it like this substr($0,60,end of line)

meaning take it from point 60 and take all characketrs in that line until line is over..

stupit q?? but is there good answer on it?? )))

cheers,
  #2 (permalink)  
Old 06-21-2006
tayyabq8's Avatar
tayyabq8 tayyabq8 is offline Forum Advisor  
Moderator
  
 

Join Date: Nov 2004
Location: Bahrain
Posts: 578
Skipping 3rd argument will give you the desired result, means you could try substr($0,37) it'll give you from position 37 till eol.
  #3 (permalink)  
Old 06-22-2006
amon amon is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 71
that works fine...thanks a lot..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0