![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| need help extracting this part | finalight | Shell Programming and Scripting | 6 | 05-20-2008 06:03 AM |
| Using find command with awk or basename | sam_78_nyc | Shell Programming and Scripting | 4 | 11-05-2007 07:49 PM |
| Extracting part of a string | sam_78_nyc | Shell Programming and Scripting | 8 | 04-25-2007 07:37 PM |
| reverse of basename | braindrain | Shell Programming and Scripting | 7 | 10-03-2006 02:24 AM |
| extracting uncommon part between two files | sabyasm | Shell Programming and Scripting | 2 | 11-06-2005 01:25 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Extracting part of the basename
Hi,
I was wondering if there is an easy way to strip off the required basename. I have a script called apb0110021.sh and the contents of the script are Code:
typeset -u MScript=`basename $0 | cut -d. -f1` scriptname=sys.Audit.ksh parms="PROJECT1 dsAudit $MScript 1 BEGIN" $SCRIPTS/$scriptname $parms Change required: After a code review, the script name has to be changed to sys.mrch_mart_apb0110021.sh. Though the script name changes, I would still have to extract only the apb0110021 and pass it as one of the parameters. Is there an quick turn around solution to this without involving a lot of code change? Please advice. Madhu |
|
|||||
|
Yes,
see this |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|