![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script to monitor process running on server and posting a mail if any process is dead | pradeepmacha | Shell Programming and Scripting | 13 | 03-06-2009 07:33 AM |
| Need to get pid of a process and have to store the pid in a variable | samudha | UNIX for Dummies Questions & Answers | 7 | 08-05-2008 04:24 AM |
| Killing of a process and send a mail if the process doesnot come up within 2 minutes | Prince89 | Shell Programming and Scripting | 1 | 02-15-2008 07:10 PM |
| striping the text in AWK | yoyo123 | Shell Programming and Scripting | 3 | 11-08-2007 12:13 PM |
| how to start a process and make it sleep for 5 mins and then kill that process | shrao | Shell Programming and Scripting | 6 | 03-27-2007 01:54 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Striping process variable
Hello. I would like to strip out the process name from the ${0##*\} variable. So that if I have a script named "mytest.script" the variable would be populated with just "mytest" I have tried doing a substring but it doesnt seem to work. Code:
name=`expr match "${0}" : './*\(/*.\)'`
Doing this gets me "m". I can do it in 2 steps. But I would like to accomplish in 1 if there is a way. Thank you, |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|