Hello
I have a script:
path=test1
echo "${path%?}"
till this the program is successful in deleting hte last character i.e. "1" and displays an output --> test. After this how can i save this output to another variable.
Hello
I have a script:
path=test1
echo "${path%?}"
till this the program is successful in deleting hte last character i.e. "1" and displays an output --> test. After this how can i save this output to another variable.
Just assign parameter substitution result to another variable:
path="test1"
var="${path%?}"
hi kishore,
you can use this.
path=test1
path1=`echo "${path%?}"`
notice that those are not single quotes.. that symbol is present in the button below the esc button.
hope this will help you.