About 91 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 20, 2025 · Shell scripting: -z and -n options with if Ask Question Asked 12 years ago Modified 1 year ago

  3. 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.

  4. Bash scripting: test for empty directory - Super User

    Oct 31, 2011 · Here is a bash shell function that is efficient for a directory with lots of files, doesn't rely on shell options for globbing, and explicitly tests for permission problems:

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

    Mar 21, 2020 · Prime Number Calculation using shell scripting Ask Question Asked 5 years, 10 months ago Modified 2 years, 10 months ago

  6. 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, …

  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. How to parse JSON with shell scripting in Linux?

    How to parse JSON with shell scripting in Linux? Ask Question Asked 11 years, 10 months ago Modified 2 years, 9 months ago

  9. looping through `ls` results in bash shell script - Super User

    Sep 6, 2017 · Does any one have a template shell script for doing something with ls for a list of directory names and looping through each one and doing something? I'm planning to do ls -1d */ to get the list of

  10. scripting - format the shell script output as a table - Unix & Linux ...

    Feb 17, 2020 · I am running a script in a loop which creates some data as per some logic and then displays output in some combination but the output I am getting is in new line Roll number : 187437...