Hi,
Can somebody tell the usage of "$_"
cd $_ ?
and ls $_ ?
Hi,
Can somebody tell the usage of "$_"
cd $_ ?
and ls $_ ?
my bash tell me $_=clear
you can use to clear screen
use ksh...
imp catch...
cd /tmp
cd /etc
ls <dir> ---> some directory
cd $_ -- ?
what will be "pwd" and how ?
$_ :- Is a Special variable set to last argument of previous command executed.
Examples:-
#!/bin/bash
echo $_ # /bin/bash
# Just called /bin/bash to run the script.
du >/dev/null # So no output from command.
echo $_ # du
ls -al >/dev/null # So no output from command.
echo $_ # -al (last argument)
:
echo $_ # :