Shell Question# Unix - 噫吁兮,危乎高哉
j*n
1 楼
Hi, Every High Hand,
One question
In my shell script, I need to pass a absolute file name to
it:
e.g.
>main.sh /home/username/config.cfg
I need to run this script with different cfg files, and make
some temp directories, according to the filename.
How can I parse the absolute file location to the filename
without extenstion?
e.g.
How to parse '/home/username/config.cfg' -> 'config'?
Thanks in advance.
One question
In my shell script, I need to pass a absolute file name to
it:
e.g.
>main.sh /home/username/config.cfg
I need to run this script with different cfg files, and make
some temp directories, according to the filename.
How can I parse the absolute file location to the filename
without extenstion?
e.g.
How to parse '/home/username/config.cfg' -> 'config'?
Thanks in advance.