I know this is simple, but I can not figure it out.
I need to remove the first character (a slash) of a variable:
What I have is this, which will not work.
TESTSTRING="/var"
NEWSTRING=$TESTSTRING | colrm 1 2
echo $NEWSTRING
var
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to remove a character (slash) from string
here's one way of doing it...
$ bash test_script
/var
var
$
Code: Select all
TESTSTRING="/var"
NEWSTRING=`echo "$TESTSTRING" | colrm 1 1`
echo "$TESTSTRING"
echo "$NEWSTRING"
/var
var
$