Microsoft
Software
Hardware
Network
Question : How do I create a bash script for this command?
I'm trying to create a bash script that I can call like this:
source joomla_upgrade.sh 11255 11410
where 11255 and 11410 are the revision numbers of an svn repository. I want those revision numbers passed into the following command inside joomla_upgrade.sh:
#!/bin/bash
for i in $(svn diff --summarize -r 11255:11410
http://joomlacode.org/svn/
joomla/dev
elopment/r
eleases/1.
5
| awk '{ print $2 }'); do p=$(echo $i | sed -e 's{
http://joomlacode.org/s
vn/joomla/
developmen
t/releases
/1.5/
{{');
mkdir -p $(dirname $p); svn export $i $p; done
I'm just not clear how to pass the command line parameters into the script. Normally it would be referenced as $1 and $2, I believe, but the script already has a $2 in it...
Answer : How do I create a bash script for this command?
you are correct , $1 and $2. $2 in the script is different since it is awk parameter and not shell
Random Solutions
Failed to backup sql server 2000
PERL DBI MYSQL Import .sql into MySQL using PERL DBI
unable to validate or Register Win XP Prof. Oem anymore
Symantec Ghost 14.0 - - Ghosting Problems
Why is uploading through CF so SLOW compared to an ISAPI DLL?
Need help understanding how to run a parameterized query
Need to insert a value into a textbox (which is in an iFrame) from an HTML page
Bulk Insert with Text Qualifiers
Keep Alias Name in Exchange on inbound emails
delete a record using VBA.