

InterviewSolution
Saved Bookmarks
1. |
Solve : Hi, I am new to linux. Don't hesitate if I ask a silly queston.? |
Answer» When you assign a value $1 to some variable, what actually it assigns. what is the value of Build_dir ? Did you mean in a script? If so, then $1 is whatever is the first argument on the command line. If myscript.sh contained this line: Build_dir = $1; ... and you called it like this... sh myscript.sh /home/myfolder ... then Build_dir would have the value /home/myfolder. $$ = The PID number of the process executing the shell. $? = Exit status variable. $0 = The name of the command you used to call a program. $1 = The first argument on the command line. $2 = The second argument on the command line. $n = The nth argument on the command line. $* = All the arguments on the command line. $# The number of command line arguments hey in scripting the first argument through commandline is considered as $1 if u FAIL to give arguments . you should display an error message and ask for entering arguments $1 is th argument which u enter after the filename in commandlinethanks that helps. I wanna LEARN more linux stuff grrrrrrrrr |
|