|
I'm running autoconf and configure sets SHELL to '/bin/sh'. This creates huge problems. How to force SHELL to be '/bin/bash' for autoconf?
I'm trying to get this running on osx, it's working on linux. Linux is using SHELL=/bin/bash. osx defaults to /bin...
Started by Flinkman on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Please don't hose your system by doing it!)
Where is SHELL being set to that? What is being run with /bin/sh when you want /bin/bash?
configure scripts are meant to run anywhere....
Ln -f /bin/bash /bin/sh
:-P (No, it's not a serious answer.
|
|
Hello guys,
I'm beginner of bash shell programming. Can you tell me about '$$' symbols in the bash shell?
if i try like following
#> echo $$
it would print that.
#>18756
Could you tell me that symbol used for what and when?
Thanks.
Started by Nyambayar on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You might use it to track your process over its life - use ps to see if it's still running, send it a... .
It's the process id of the bash process itself.
Circumstances, such as subshells that do not require bash to be re-initialized.
|
|
Hi folks,
I'm writing a shell script (will become a cronjob) that will:
1: dump my production database
2: import the dump into my development database
Between step 1 and 2, I need to clear the development database (drop all tables?). How is this best ...
Started by Hoff on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
On a UNIX or Linux.
I'd just drob the database and then re-create it.
That by your development_db_name.
|
Ask your Facebook Friends
|
Bash is used by default in every Linux distro I have tried, over alternatives like zsh. Is there a technical or historical reason for this?
Started by Richard on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at superuser):
Ash is often used as /bin/sh so that while bash may be the interactive shell, ash is the "just, because there it is built with....
It is one of ~~2 the default.
It really is a good shell.
Bash has two completely different things going for it.
|
|
Hi,
We've had these for a lot of other languages. The one for C/C++ was quite popular, so was the equivalent for Python . I thought one for BASH would be interesting too.
Started by Kent on
, 15 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
-type d -name .svn | xargs rm -rf to -type f
In a BASH script, assign an argument to variable but provide a default if it exists:
MYVAR - /usr/local/bin>
...and....
Find.
Not strictly bash but useful nonetheless.
Unwanted directories).
|
|
The following code
number=1 if [[ $number =~ [0-9] ]] then echo matched fi
works. If I try to use quotes in the regex, however, it stops:
number=1 if [[ $number =~ "[0-9]" ]] then echo matched fi
I tried "\[0-9\]", too. What am I missing?
Funnily enough...
Started by tpk on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
$ bash --version GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu) Copyright (C) 2007 Free =~ [0-9] ]]; then echo match; fi match....
New Features in Bash snip
f.
Page (doc/bash.1) is the place to look for complete descriptions .
|
|
I made a Bash script which uses an expect script to automate ssh logins.The script connects to multiple servers and runs some commands. The bash script prompts for login credentials once.
I want to incorporate a feature wherein the script terminates if...
Started by Sharjeel Sayed on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Rest of your script } }
I assume you don't need to know about || echo "non-zero return from opcagt: $?" expect... .
Expect { -re {assword: $} { send -- "$SPASS\r" exp_continue # remain in this expect happened"} -re $prompt } # ...
Spawn ssh ...
|
|
A simple Bash variable test goes:
${varName:? "${varName} is not defined"}
I'd like to re-use this, by putting it in a function. How please?
Following fails
# # Test a variable exists tvar(){ val=${1:? "${1} must be defined, preferably in $basedir"} if...
Started by DaveP on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Message if you do something like this:
$ foo="" $ assertNotEmpty foo bash: !1: foo is empty, aborting, I was led to a part of the Bash man page that I've overlooked hundreds of times:
When not performing substring expansion, bash....
|
|
I've tried
chmod 700 /bin/kill chown root /bin/kill
but a normal user can still do:
kill blah
... and successfully kill the app 'blah' running under the user's account.
I'm using Ubuntu (8.10). The bash shell apparently has the kill command built-in and...
Started by Ben L on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
More info.
Furthermore, even with bash, then change them to the rbash (restricted bash) shell.
The answer is that short of compiling your own version of bash, you can't.
|
|
Bash is getting a little long-in-the-tooth. Windows has PowerShell (formerly known as Monad), which is capable of dealing with richer objects than just lines of text. Is there any equivalent new powerful shell for Linux/Mac?
It should be of similar expressiveness...
Started by sanity on
, 17 posts
by 17 people.
Answer Snippets (Read the full thread at stackoverflow):
Pash is a work-in-progress....
Allow me to go into more detial.
Perl is pretty much found on any Linux.
I have not tried concern is that Bash shell scripts are too limited, use Perl.
ZSH is similar to bash, but more powerful in several ways.
|