I need little help on extracting string using csh. I have a variable containing a long string ending with _abc. I need to extract the whole string except _abc using csh. please help
Asked
Active
Viewed 615 times
1 Answers
1
You should have the command basename
available, in which case you want
echo `basename mystring_abc _abc`
>> mystring

Andrew Marshall
- 1,469
- 13
- 14