About 802,000 results
Open links in new tab
  1. What is the meaning of $? in a shell script? - Unix & Linux Stack …

    Feb 20, 2011 · This latter usage is faster, does not contaminate the shell's variable namespace with what amounts to temp variables, can often be a lot more readable for humans and …

  2. How can I pass a command line argument into a shell script?

    Feb 10, 2012 · The shell command and any arguments to that command appear as numbered shell variables: $0 has the string value of the command itself, something like script, ./script, …

  3. What does $# mean in shell? - Unix & Linux Stack Exchange

    What does $# mean in shell? I have code such as if [ $# -eq 0 ] then I want to understand what $# means, but Google search is very bad for searching these kinds of things.

  4. Shell scripting: -z and -n options with if - Unix & Linux Stack …

    Jan 16, 2014 · Explore related questions shell-script test See similar questions with these tags.

  5. bash - How do I add environment variables? - Ask Ubuntu

    Aug 27, 2011 · The variable will be set for the rest of the shell session or until unset. To set an environment variable everytime, use the export command in the .bashrc file (or the appropriate …

  6. In a bash script, using the conditional "or" in an "if" statement

    In a bash script, using the conditional "or" in an "if" statement Ask Question Asked 13 years, 3 months ago Modified 1 year ago

  7. bash - Killing a shell script running in background - Unix & Linux ...

    Dec 13, 2014 · I have written a shell script to monitor a directory using the inotifywait utility of inotifyt-tools. I want that script to run continuously in the background, but I also want to be able …

  8. Current time/date as a variable in BASH and stopping a program …

    Mar 5, 2018 · Related things: About backticks in command substitutions: Have backticks (i.e. `cmd`) in *sh shells been deprecated? About quoting variable expansions: Security …

  9. Passing named arguments to shell scripts - Unix & Linux Stack …

    $ ./my_script -p '/some/path' -a5 Argument p_out is /some/path Argument arg_1 is 5 There is a helpful Small getopts tutorial or you can type help getopts at the shell prompt. Edit: The …

  10. shell script - what is >> symbol and - in unix/Linux?

    See What is the difference between > and >> (especially as it relates to use with the cat program)?, What does “3>&1 1>&2 2>&3” do in a script? and of course, your shell's manual. …