Reputation: 3
I have an ultra-simple script that houses the Linux program shred, and it contains the parameters that have always worked from the command line (bash). Specifically 'shred -uzn 35'
The script, named D, has execute permissions set.
When I run the script, bash prints an error:
$ D some_file_to_delete
shred: missing file operand
I realize that the solution to the problem is probably as simple as the program itself. Please help?
Thanks in advance.
EDIT: The error "missing file operand" was due to the fact that the script was not set to take arguments, such as via "$@". Also, as stated in the accepted answer, I agree that an alias makes total sense for such a scenario (much more sense than, say, a script somewhere in $PATH).
Upvotes: 0
Views: 509
Reputation: 56089
Since you are using a script, not an alias, you need to pass the arguments through
shred -uzn 35 "$@"
In this case, however, I suggest you do make it an alias. In your .bashrc
file, add this:
alias D='shred -uzn 35'
Upvotes: 3