
02-25-2007
|
|
Registered User
|
|
Join Date: Jan 2007
Posts: 366
|
|
Quote:
|
Originally Posted by ahmedwaseem2000
You could use either the awk or the cut solutions they will work in all the scenarios. Here is the sed solution to generalize on both the occasions.
Code:
echo "filename.tar" | sed "s/\([^.*]\)\.\(.*\)*$/\1/g"
|
echo "filename.tar" | sed "s/\..*$//"
|