Log in Sign up
2 Matching Annotations
  1. Feb 2024
  2. unix.stackexchange.com unix.stackexchange.com
    How to write a script that accepts input from stdin or a file?
    1
    1. TylerRick 28 Feb 2024
      in Public
      if [ "$#" -eq 0 ]; then cat else printf '%s\n' "$@" fi |
      not: command line: cat: useless use of cat shell: pipeline non-recursive
    Visit annotations in context

    Tags

    • not:
    • command line: cat: useless use of cat
    • shell: pipeline
    • non-recursive

    Annotators

    • TylerRick

    URL

    unix.stackexchange.com/questions/580971/how-to-write-a-script-that-accepts-input-from-stdin-or-a-file
  3. unix.stackexchange.com unix.stackexchange.com
    Bash function that accepts input from parameter or pipe
    1
    1. TylerRick 28 Feb 2024
      in Public
      The lonesome cat isn’t useless.  UUOCs are typically characterized by having exactly one filename argument; this one has none.  It connects the input to the function (which is the input of the if statement) to the output of the if statement (which is the input to the base64 –decode statement)
      not: command line: cat: useless use of cat I agree conditionals: all branches must behave compatibly
    Visit annotations in context

    Tags

    • not:
    • conditionals: all branches must behave compatibly
    • command line: cat: useless use of cat
    • I agree

    Annotators

    • TylerRick

    URL

    unix.stackexchange.com/questions/301426/bash-function-that-accepts-input-from-parameter-or-pipe
Share:
Group. Only group members will be able to view this annotation.
Only me. No one else will be able to view this annotation.
Hypothes.is
  • About
  • Blog
  • Bioscience
  • Education
  • Jobs
  • Help
  • Contact
  • Terms of Service
  • Privacy Policy