Hi All
I am running a insatll script in linux which installs the project.
Could you please help in interpreting this command
gawk '{ if (substr($1,0,1) == "\047") gsub("^\047+|\047+$", "", $1); print }'
where $1 = BBME
Thanks
Hi All
I am running a insatll script in linux which installs the project.
Could you please help in interpreting this command
gawk '{ if (substr($1,0,1) == "\047") gsub("^\047+|\047+$", "", $1); print }'
where $1 = BBME
Thanks
It will remove single quotes at the beginning and end if found at the beginning of the string.
\047 = '
root@bt:/tmp# cat file
'BBME'
root@bt:/tmp# awk '{ if (substr($1,0,1) == "\047") gsub("^\047+|\047+$", "", $1); print }' file
BBME
HTH
--ahamed