About 1,220,000 results
Open links in new tab
  1. What does $# mean in shell? - Unix & Linux Stack Exchange

    You can always check the man page of your shell. man bash says: Special Parameters # Expands to the number of positional parameters in decimal. Therefore a shell script can check …

  2. shell - What is the "eval" command in bash? - Unix & Linux Stack …

    In shell terminology, eval is a built-in, not a function. In practice, built-ins behave a lot like functions that don't have an in-language definition, but not quite (as becomes apparent if you …

  3. shell - How to check OS and version using a Linux command

    Kernel Version. If you want kernel version information, use uname(1). For example: $ uname -a Linux localhost 3.11.0-3-generic #8-Ubuntu SMP Fri Aug 23 16:49:15 UTC 2013 x86_64 …

  4. How do I remove a directory and all its contents?

    Aug 17, 2012 · If rm -r doesn't work, that would be an OS issue, not a shell issue. (Strictly speaking, it would be an issue with the version of rm that you're using, so you could address it …

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

    You can find a very nice reference for bash's [aka test builtin's operators here, or by running help test in a bash shell or info bash test or info bash '[' from any shell¹. If you are using a different …

  6. Running a shell command as root - Unix & Linux Stack Exchange

    On many systems booting into single user mode will give the user access to a root shell without prompting for a password. Notably, systemd-based systems will prompt you for the root …

  7. shell - How to go to the previous working directory in terminal?

    The echo shows the new directory not the previous one. And I would find it useful, so that I know where I am now, especially if I'm in a shell that only shows the current directory name (or …

  8. How to conditionally do something if a command succeeded or …

    It's probably the most common command to use in an if, which can lead to the assumption that it's part of the shell's syntax. But if you want to test whether a command succeeded or not, use …

  9. shell - What does "--" (double dash / double hyphen) mean?

    In man bash we can read in Shell Builtin Commands section : Unless otherwise noted, each builtin command documented in this section as accepting options preceded by -accepts --to …

  10. shell - How to do integer & float calculations, in bash or other ...

    Jun 14, 2013 · Using POSIX shell functions, and awk math power, just define this (one line) function: calc(){ awk "BEGIN { print $*}"; } Then just execute things like calc 1+1 or calc 5/2. …

Refresh