Reputation: 36013
I type this line on terminal:
tar -czf temp.tar.gz aDirectory/*
it works.
I add this line inside a bash script:
invalid command name "tar"
while executing
"tar -czf temp.tar.gz aDirectory/*"
(file "./backup" line 3)
I have tried also to precede tar by /usr/bin
. Same problem.
Why?
Upvotes: 0
Views: 148
Reputation: 20797
The error message looks like it's reported from tcl.
[STEP 116] $ cat backup
#!/usr/bin/tclsh
tar -czf temp.tar.gz aDirectory/*
[STEP 117] $ chmod +x backup
[STEP 118] $ ./backup
invalid command name "tar"
while executing
"tar -czf temp.tar.gz aDirectory/*"
(file "./backup" line 3)
[STEP 119] $
Upvotes: 1