In a shell script, I used cat, grep and cut to get a number out of a log file.
INCIDENTNUM=`cat $LOGFILE | grep "INCIDENT NUMBER" | cut -d";" -f 2`
INCIDENTNUM returns " 23"
How do I delete an space char in the front so it reads "23" instead of " 23"?
Thanks,
INCIDENTNUM=`cat $LOGFILE | grep "INCIDENT NUMBER" | cut -d";" -f 2`
INCIDENTNUM returns " 23"
How do I delete an space char in the front so it reads "23" instead of " 23"?
Thanks,