23 hours ago
I saw a script like below,
#! /bin/zsh -
rm -f /mnt/md0/capture/DCN/*(ND.Om[1,$del])
What was purpose of adding - on a shebang line?
21 hours ago
A - or -- signals the end of options and disables further option processing. Which means that bash will not accept any of its option. Any arguments after the -- are treated as filenames and arguments.
An argument of - is equivalent to --. This is done to improve script security. Some user may perform setuid based script root spoofing. To avoid interpreter spoofing you need to add -- to #!/bin/bash. This is rare but possible attack.nixCraft