Dear Group..
I am very new user of Linux..
Can any of you help me to complete my script.?
I have two commands
$DISPLAY - will give o/p as ARUN:00.0
and hostname - will give o/p as ARUN
I need to get from $DISPLAY as ARUN(trim after
if the $DISPLAY fails to return, get o/p from hostname(no need to trim)
my concept is
X = $DISPLAY
IF(trim(X,":")=="") then
echo hostname
else
echo trim(X,":")
end;