Myvideo

Guest

Login

Shell Scripting Tutorial for Beginners 4 - Pass Arguments to a Bash-Script

Uploaded By: Myvideo
1 view
0
0 votes
0

Passing arguments to a shell script Any shell script you run has access to (inherits) the environment variables accessible to its parent shell. In addition, any arguments you type after the script name on the shell command line are passed to the script as a series of variables. The following parameters are recognized: $* Returns a single string (``$1, $2 ... $n’’) comprising all of the positional parameters separated by the internal field separator character (defined by the IFS environment variable). $@ Returns a sequence of strings (``$1’’, ``$2’’, ... ``$n’’) wherein each positional parameter remains separate from the others. $1, $2 ... $n Refers to a numbered argument to the script, where n is the position of the argument on the command line. In the Korn shell you can refer direct ... #ProgrammingKnowledge #Bourne_Shell_and_Programming #Bash_scripting #Unix #Tutorials #Learning #Operating #System #OS #Beginners 20170304 BjBBfmDRakg

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later