10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone,
Could someone please explain to me why I get cd: too many arguments when I select a dir that has one or more spaces in the name?
This is the code
#!/bin/bash
tmp_loc=$(zenity --file-selection --directory)
if ]; then
exit 0
else
location=${tmp_loc// /\\ } # this... (7 Replies)
Discussion started by: soichiro
7 Replies
2. 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
3. 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
4. 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
5. 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
6. Shell Programming and Scripting
This script moves all the doc files to a specified directory. I have managed to put an argument but the problem I am facing is putting the full path where the scripts are moving to, for example I want to run the script like this below
./loo -d then path where im moving the files (i.e ./loo -d... (3 Replies)
Discussion started by: elginmulizwa
3 Replies
7. Shell Programming and Scripting
this script moves all the doc files to a specified directory....i have managed to put an argument but the problem im facing is puting the full path where the scripts are moving to for example i want to run the script like this below
./loo -d then path where im moving the files (i.e ./loo -d the... (2 Replies)
Discussion started by: elginmulizwa
2 Replies
8. 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
9. Shell Programming and Scripting
This script is called fuu;
#!/bin/bash
speak() {
case $1 in
1)echo one
;;
2)echo two
;;
3)echo three
;;
esac
}
speak
exit 0
when i run fuu 2 i expect "two" like... (2 Replies)
Discussion started by: Tártaro
2 Replies
10. Shell Programming and Scripting
Hi there,
I've been scouring these forums and have found similar threads, but none apparently helped me solved my problem :rolleyes:
I'd like to run a command within a bash script, but that command is provided by the user to the script and may contain quotes, which is where the problem lies.... (9 Replies)
Discussion started by: cypression
9 Replies