Search Results

Search: Posts Made By: scandora
15,391
Posted By scandora
Thanks cfajohnson, but that back slash prevents...
Thanks cfajohnson, but that back slash prevents LINENO from ever being expanded:

joe@rose:~$ MYNAME=joe
joe@rose:~$ MYPID=$$
joe@rose:~$ LOGGER="/usr/bin/logger -t $MYNAME[$MYPID](\$LINENO) -p...
15,391
Posted By scandora
bash - delay expansion of variable
Hello -

I have a bash script which does some logging, and I'd like to include the line number of the echo statement that pipes into $LOGGER:

MYPID=$$
MYNAME=`basename $0`...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy