Ikon
1
I want to call a script like this:
./somescript some-thing[who].knows.what.ending
Inside the script it needs to split at last .(period)
so I can:
a=some-thing[who].knows.what
b=ending
I know I can do it in perl but im still learing awk and sed.
Thanks
danmero
2
Use parameter expansion.
a=${1%.*}
b=${1##*.}
Do you really want to use awk or sed?
Ikon
3
Not if I dont have too...
Is there a cheat sheet somewhere for these?
Works great thanks...
danmero
4