Simple Shell Script Question [message #98067] |
Fri, 16 January 2004 06:11 |
KK
Messages: 24 Registered: March 2002
|
Junior Member |
|
|
Hi All!
I am modifying the following shell script which displays the incorrect output when executed.
# $7 = Description;
str2=`echo $7|cut -c 28-$str_len`
*****Line that is giving error in program
echo "$str2"
The problem I am having is str2 can have different values as stated below:
str2 = Rope is 7" long (It is not displaying correctly because of the double quotes in the description after the 7)
str2 = Current Ass'y Line (This description currently displays correctly)
str2 = Test item (This description currently displays correctly)
Does anyone have any suggestions on allowing the description to be entered and displayed to contain no quotes, single quotes or double quotes?
Thanks in advance for your help!
|
|
|
|