|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Unix Script
Im using /bin/sh to write a simple script. I need to take a path name and take the filename from it to use as a parameter in a command later on. But I can't seem to find out how.
Ie /opt/something.xml convert to something.xml |
|
#2
|
||||
|
||||
|
var=`basename /opt/something.xml`
__________________
According to Sod's Law, buttered toast lands butter side down, when dropped. Per nature, cats always land on their feet. So, what happens when you strap buttered toast to the back of a cat and throw it out a window?. |
|
#3
|
|||
|
|||
|
one more,
Code:
filename=`echo "/opt/something.xml" | sed 's/^.*\///'` |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Unix Script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|