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
whats this NAME=${0##*/} Arunprasad Shell Programming and Scripting 7 10-02-2008 07:17 AM
Whats Behind Your Name? google What's on Your Mind? 66 10-18-2005 08:40 PM
Whats the go? Neo Post Here to Contact Site Administrators and Moderators 1 10-01-2004 12:52 PM
Whats does this mean jyotipg Shell Programming and Scripting 1 04-06-2004 08:11 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-04-2008
Arunprasad Arunprasad is offline
Registered User
  
 

Join Date: Aug 2008
Location: syn chen
Posts: 73
Post ##*_ - whats this?

Hi all,

could you please tell me whats this stands

##*_
0##*/

i knew this alone if some more is there please tell me that also.
  #2 (permalink)  
Old 12-04-2008
borderblaster borderblaster is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 48
what where you doing to get this output?
  #3 (permalink)  
Old 12-04-2008
Arunprasad Arunprasad is offline
Registered User
  
 

Join Date: Aug 2008
Location: syn chen
Posts: 73
the below is the statement in my script.

1. read -r variable < /path/file.txt
finalvar=${variable##*_}

2. MYNAME=${0##*/};

please let me know what it is actually doing.
  #4 (permalink)  
Old 12-04-2008
Autocross.US's Avatar
Autocross.US Autocross.US is offline
Registered User
  
 

Join Date: Nov 2008
Location: Chesapeake, VA
Posts: 73
They are pattern matching arguments used to strip off certain portions of a string from either the front or end of the string.

Example:
Code:
$ >  STRING=this_test_string
$ >  echo ${STRING##*_}
string

$ >  DIR=/home/user1/test
$ > echo ${DIR##*/}
test
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 09:23 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