-
Notifications
You must be signed in to change notification settings - Fork 1.9k
SC2277
Joachim Ansorg edited this page Nov 12, 2021
·
2 revisions
#!/bin/bash
$0=myscriptname#!/bin/bash
BASH_ARGV0=myscriptnameYou appear to be trying to assign a new value to $0 in a Bash script. To do this, instead assign to the special variable BASH_ARGV0.
If you instead wanted to compare the value of $0, use a comparison like [ "$0" = "myname" ].
None.
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!