Tagged Questions
0
votes
1answer
132 views
Can someone provide an xargs example piping mysql query data into another command?
Can someone provide an example for the command xargs? I want to do a mysql query to return the ID field of a column then feed that result into xargs into another command say mysql query delete. How ...
0
votes
3answers
89 views
How to create an interactive bash script to collect arguments for a command in linux?
I'm trying to create an interactive bash script where I can collect user input variables to be used as arguments in another command. Can someone provide me an example of this?
Currently i want to do:
...
2
votes
3answers
2k views
How can I check if mysql is installed using a bash script?
I need to check if mysql is installed from within a bash script. What would be an efficient way of doing that? I thought I could do this:
if [ ! -f `which mysql` ] ; then
echo "foo"
fi
But I ...
0
votes
1answer
141 views
How to use a password as an external variable in shell?
I have this MySQL backup script that I use to back up MySQL databases. Very useful, and it runs on fixed intervals using a cron. However, I need somehow provide this script with the MySQL password. ...
2
votes
1answer
379 views
How to script a database migration using SSH?
I am trying to create a sync.sh script that coordinates with our less-than-ideal version control for our website. This script will migrate a copy of the live database to our local development ...
2
votes
2answers
122 views
List files that occur lexically after/greater than a given prefix (or, run database upgrade scripts in a proper order)
I'm trying to create a shell script that runs through a bunch of SQL scripts.
I've these files:
$ ls upgrade/
01-foo.sql 02-bar.sql 02-baz.sql 03-foo1.sql 04-buz.sql
And I've got the version of ...
1
vote
1answer
222 views
How to install a database dump via Shell Script?
I have a Mysql database dump. I want to install it with Hudson via a Shell Script to an external Linux machine.
How can you take a Mysql script and run it inside a database on other machine? I know I ...
0
votes
1answer
313 views
How to write script for automatic joomla installation in webhost
I want to create a script in Linux that automatically downloads the latest Joomla from their website and then installs it to the specified user. Is it possible in a shell script?
I don't know how it ...