EmbLogic's Blog

shell script

-l hello “hello world”
$0 $1 $2 $3
i don,t understand these symole in shell..

One Response to shell script

  1. divakant says:

    $0-executable file name(its tells ur file name which u currently used)
    $1,$2:no of commands/parameter
    such as if we type a sentence”hello world”
    here hello is rep. $1
    nd world is rep. $2
    three more commands r also used………..

    $#:list of parameter(its tells how many parameter we used or simply count the parameter)
    $@:string in double quotes………..
    $*:parameters(such in above example hello hello world..
    both $* and $@ O/p is same so nowdays $@ is not widely used…….

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>