"hey, write us a simple interface for this shell script.."
- input must be a file, does not accept loading through stdin/redirect
- accepts relative path input from one specific directory only
- fails if provided absolute path
- even though it fails, it still returns return code 0

and every time we've tried to open up a topic of programming practices we got slammed with "we're ops. you should be glad they're doing at least some scripting"

  • 0
    So many red flags....
  • 3
    Symlink /dev/stdin locally and pass it as a file?
  • 1
    @netikras hm, haven't thought of this. thank you
  • 0
    @qwwerty did it work?
  • 1
    @netikras sorry, i haven't got to test it before.

    I've PoC'ed the stdin symlink, even tested it in plaintext over SSH ensuring we fit into ARG_MAX/CLI line limit.

    Then i found out it would have worked, but the script has it's output set to [input_file]_output.txt. So having one stdin_symlink file would create a problem when the script would attempt to write stdin_symlink_output.txt for two users executing it in parallel.

    Guess i'll either have to rewrite the script or just keep transfering files. File transfer is written and tested already, so i'll revert to "it works, don't touch it"
Add Comment