Need some adice on shell scripting [message #255677] |
Wed, 01 August 2007 08:31 |
puneetsachar
Messages: 97 Registered: March 2005 Location: New Delhi, India
|
Member |
|
|
hi guys!!!
I have small problem..
I need to seprate the path and the file name
E.g
/u01/app/oracle/LONDON/admin/logs/abc.txt
/u01/app/admin/log/abc.txt
/usr/app/oracle/app/admin/logs/CRP/abc.txt
I want to seprate the abc.tx and the path and store them in variables.
If my path was not dyamic i thought of using and implementing following logic
PUNEET=/u01/app/oracle/LONDON/admin/logs/abc.txt
export PUNEET
echo $PUNEET|cut -f7 -d/ which will give me abc.txt
however now my patch is dynamic,so i can't implement it
Please advice,,,,
Puneet
|
|
|
|
|
|
|
|
|
|