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
Code:
#!/bin/bash
tmp_loc=$(zenity --file-selection --directory)
if [[ -z $tmp_loc && ${tmp_loc+x} ]]; then
exit 0
else
location=${tmp_loc// /\\ } # this adds backslashes if need it
echo $location
cd $location # cd: too many arguments if the dir's name has spaces
fi
Hello,
I have a very stupid/simple problem, but for some reason I cannot figure out...and I need your help!
I am writting a bash scrip that should be executed using "my_script X Y Z T" where X Y Z and T can be any string, but there can be any number of arguments.
I want my script to do... (4 Replies)
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)
1. The problem statement, all variables and given/known data:
Write a shell program called myenv which takes one argument. The argument should be the name of an environment variable, such as PATH HOME etc. myenv should print out the value of the variable given as the argument. If no argument is... (1 Reply)
Hello, I've got this little script that gets a bunch of comics and puts them in an html file. However, when I check that the comic URL is there and that it's a new one, I get the "too many arguments" error. The script is this:
CADURL=`curl --silent http://www.cad-comic.com/cad/ | grep -o... (10 Replies)
I have trouble getting this logic to work
#!/bin/bash
function assign_var(){
while
do
read -p "$2 :" $3
done
}
assign_var '$IPADDRESS' ipaddress IPADDRESS
Basicly, i want to make sure that entry is made (i can add more sophisticated checks later), but the idea is to recycle... (11 Replies)
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)
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)
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)
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
LEARN ABOUT DEBIAN
wzd-config
WZD-CONFIG(1) wzdftpd Client Applications WZD-CONFIG(1)NAME
wzd-config - retrieve information about the installed version of wzdftpd
SYNOPSIS
wzd-config { --prefix | --exec-prefix | --data-dir | --libs | --cflags | --version }...
DESCRIPTION
The wzd-config utility prints configuration parameters of the currently installed version of wzdftpd. It is intended, for example, to be
used by software packages that want to interface to wzdftpd to facilitate finding the required header files and libraries.
OPTIONS
To use wzd-config, supply one or more of the following options:
--prefix
Print the installation prefix, as specified in configure script.
--exec-prefix
Print the installation prefix for executables, usually the same as prefix. This is where you will find server ($eprefix/sbin) or
tools ($eprefix/bin).
--data-dir
Print installation dir for data, modules and backends.
--libs Print the location of object code libraries (use to develop new extensions).
--cflags
Print the location of include headers (use to develop new extensions).
--version
Print the version of wzdftpd and exit.
If more than one option (except for --version) is given, the information is printed in that order, one item per line.
NOTES
In releases prior to wzdftpd 0.4, before the wzd-config came to be, a method for finding the equivalent configuration information did not
exist.
HISTORY
The wzd-config utility first appeared in wzdftpd 0.4.
Application 2003-11-02 WZD-CONFIG(1)