I've been writing a number of bash scripts lately which get variables from a parameter or from a file.
After upgrading to a new release version, my bash scripts start spitting errors:
bash: /dev/stderr: Permission denied
in previous versions Bash would internally recognize those file names (which is why this question is not a duplicate of this one) and do the right thing (tm), however, this has stopped working now.
This should be extremely simple and someone will probably answer it in .5 seconds. I need to know what:
Code:
VARIABLE=${0##*/}
does? I do not have a shell handy to just try it in. I am reading through some scripts and need to understand this line. Any help is appreciated.
Many thanks!
- Chris
gigal,Thanks for the examples. Sorry if I assumed it was a simple issue ... most issues are. But these seem well written and nothing jumps out at me that would be of use.To answer part of your initial question, one difference between the two situations (manually running the bash script vs.
Greetings!
I have a question about conditions in Bash scripts. I would like to know the difference between the use of parentheses and square brackets.
I know it sounds like a dumb question, but can someone explain the difference between, Dropbox, Google Drive, Evernote, Pocket, feedly. Do they do the same thing and which is the better app? Thank you in advance.
I am very sorry for this question, but I really am a noob, and searching didn't help
What is the difference between
Code:
.so
and
Code:
.c
mods?
Next, once again my apologies for such an exansive, generic, probably hard-to-pin-down question, and I will greatly appreciate all advice
I have a small VPS (4 x quad core, 3GB RAM, Xen, CentOS 6 64-bit, Apache, cPanel, PHP, mySQL.
I'm still kind of new to the *nix world, so please excuse the "noobishness" of the question.
What I essentially want to know is the difference between aliases and functions in the bash shell - and when to use which one.
It seems obvious that since functions can take arguments, they are a lot more powerful - since I work mainly on the road with a netbook and want to save energy and processing powe
Hello All,
First of all, i was not sure where exactly to put this question because this is definatly not a newbie question :) .