Month: October 2018

Look into bash builtin command named typeset

$typeset -n gree=55 bash: typeset: 55′: invalid variable name for name reference $typeset -n 55=gree bash: typeset:55=gree’: not a valid identifier$typeset -n gree=pwd$echo $gree $echo $pwd $typeset -n vary=$?bash: typeset: `0′: invalid variable name for name reference$typeset vary=$?$echo $vary1$echo $vary1$echo $?0$echo $vary1$echo varyvary$echo $vary1$echo $vary1$echo $?0$typeset vary=$?$echo $vary0$ $typeset hello $echo $hello $echo $? 0

How to use dirs, pushd and popd commands ?

$pushd upstream-kernel/ ~/upstream-kernel ~ $pwd /home/jeffrin/upstream-kernel $cd .. $pushd temp/ ~/temp ~ ~ $dirs ~/temp ~ ~ $dirs -l /home/jeffrin/temp /home/jeffrin /home/jeffrin $pwd /home/jeffrin/temp $pushd ../upstream-kernel/ ~/upstream-kernel ~/temp ~ ~ $dirs -l /home/jeffrin/upstream-kernel /home/jeffrin/temp /home/jeffrin /home/jeffrin $pushd ../testing/ ~/testing ~/upstream-kernel ~/temp ~ ~ $dirs -l /home/jeffrin/testing /home/jeffrin/upstream-kernel /home/jeffrin/temp /home/jeffrin /home/jeffrin $popd ~/upstream-kernel ~/temp ~ ~