10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Users,
I have installed a standalone program to do multiple sequence alignment which takes user parameters to run the program. I have multiple sequence files and want to automate this process through a bash script. I have tried to write a small bash code but its throwing errors.
Kindly... (13 Replies)
Discussion started by: biochemist
13 Replies
2. Shell Programming and Scripting
Hi,
I wanted to pass an argument to a bash script. So that the argument is used inside the awk command inside the bash script.
I know the noraml way of passing argument to a bash script as below :
sh myScript.sh abc
Inside the bash script i can use like this
myArg1=$1
wc $myArg
But... (8 Replies)
Discussion started by: shree11
8 Replies
3. Shell Programming and Scripting
myscript.sh
#!/bin/bash
ARGA=$1
if ; then
echo "${ARGA}:Confirmed"
else
echo "${ARGA}:Unconfirmed"
fi
when I run the above script from the command line, i run it as:
./myscript.sh jsmith
now some times, i need to runn it this way: (8 Replies)
Discussion started by: SkySmart
8 Replies
4. Shell Programming and Scripting
In a bash script I have:
LSCMD="find /project/media/ -mindepth 2 -maxdepth 2 -name \"files*pkg\""
ALL_PACKAGES=$( $LSCMD | sort 2>/dev/null)
But I get nothing returned. It's just all blank. If I run the find command in a terminal, I get dozens of hits.
I figure it's the way how I'm... (3 Replies)
Discussion started by: superbbrr
3 Replies
5. Shell Programming and Scripting
Could someone help me with the script below?
I am trying to make a script having just one arguement as a command and then it executes the appropriate code
#!/bin/bash
if
then
echo "Available commands:"
echo "./exec.sh cmd1"
echo "./exec.sh cmd2"
elif
then
cmd1 =... (1 Reply)
Discussion started by: spiridakos
1 Replies
6. Shell Programming and Scripting
i'm trying to write a bash script that executes a mysql statement
mysql -sN -e INSERT INTO "$database"."$tableprefix"users (var1, var2,var3) VALUES (123, '1','')
i don't know where to put the quotes
it doesnt work with this one: `
it seems i can only put double quotes around the... (0 Replies)
Discussion started by: vanessafan99
0 Replies
7. Shell Programming and Scripting
I'm pretty new to bash scripting and I've found myself writing things like this (and the same with even more nesting):
if $CATEGORIES; then
if $LABEL_SLOTS; then
$pyth "$wd/texify_grammar.py" "$input" "$texfile" "--label-slots" "--categories" "$CATEGORY_LIST"
... (9 Replies)
Discussion started by: burbly
9 Replies
8. Shell Programming and Scripting
Hello all,
I have a very dumb problem while writing a script. I want it to execute the following command, but it's not executed because of wrong quotes. (3 Replies)
Discussion started by: privetq
3 Replies
9. Shell Programming and Scripting
This is what I have:
#!/bin/bash
#ascript.sh
WORD1=`tail -n +$1 /home/gscn/word1.txt | head -1`
sed -e "s/WORD1/$WORD1/g" < /home/gscn/configtmp > /home/gscn/config
WORD2=`tail -n +$1 /home/gscn/word2.txt | head -1`
sed -e "s/WORD2/$WORD2/g" < /home/gscn/config2tmp >... (4 Replies)
Discussion started by: guitarscn
4 Replies
10. Shell Programming and Scripting
I have some troubles with variables and quotes...
I want:
if $URL is empty (no user input) go to http://www.localhost/index.php/ else add this string (search) "?s=+$URL"
EXAMPLE:
No user input
string= http://www.localhost/index.php/
User input = "unix"
string=... (3 Replies)
Discussion started by: aspire
3 Replies