About 99 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 encourages the …

  2. Shell scripting: -z and -n options with if - Unix & Linux Stack Exchange

    Jan 16, 2014 · Shell scripting: -z and -n options with if Ask Question Asked 12 years, 3 months ago Modified 1 year, 3 months ago

  3. Adding two numbers using expr - Unix & Linux Stack Exchange

    I'm learning Shell scripting for a diploma in IT I'm currently doing. I'm trying to write a small script that adds two numbers as shown as in one of the tutorials we were given. echo "Enter two nu...

  4. shell script - Using the not equal operator for string comparison ...

    The question doesn't mention bash, and in fact deliberately only mentions shell script, both in the tags, and in the question. This answer would fail in a POSIX environment.

  5. Passing named arguments to shell scripts - Unix & Linux Stack Exchange

    I have made IDE for BASH-scripting to myself - some few thousand lines - and I have used a function like those for ten years - for reading items in different tasks in the same session - nowadays my days …

  6. Prime Number Calculation using shell scripting - Unix & Linux Stack ...

    Mar 21, 2020 · Prime Number Calculation using shell scripting Ask Question Asked 6 years, 1 month ago Modified 3 years ago

  7. What does -f mean in an if statement in a bash script?

    Jul 5, 2018 · The relevant man page to check for this is that of the shell itself, bash, because -f is functionality that the shell provides, it's a bash built-in. On my system (CentOS 7), the fine man page …

  8. scripting - how can I add (subtract, etc.) two numbers with bash ...

    I can read the numbers and operation in with: echo "First number please" read num1 echo "Second number please" read num2 echo "Operation?" read op but then all my attempts to add the numbers …

  9. How to parse JSON with shell scripting in Linux?

    One way would be to use your shell to combine these tools: ... Now, maybe you have a single command that give you one json blob for all instances with more items in that "Instances" array. Well, if that is …

  10. When to use Bash and when to use Perl/Python/Ruby?

    Shell scripts like bash, ksh, zsh, sh, and fish are notoriously surprising, compared to high level general purpose languages like Ruby, Python, or Perl. While a shell script may begin its life as a shorter file …