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 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)
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
LEARN ABOUT DEBIAN
plbin
PLBIN(3plplot) PLplot API PLBIN(3plplot)NAME
plbin - Plot a histogram from binned data
SYNOPSIS
plbin(nbin, x, y, opt)
DESCRIPTION
Plots a histogram consisting of nbin bins. The value associated with the i'th bin is placed in x[i], and the number of points in the bin
is placed in y[i]. For proper operation, the values in x[i] must form a strictly increasing sequence. By default, x[i] is the left-hand
edge of the i'th bin. If opt=PL_BIN_CENTRED is used, the bin boundaries are placed midway between the values in the x array. Also see
plhist(3plplot) for drawing histograms from unbinned data.
Redacted form: General: plbin(x, y, opt) Perl/PDL: plbin(nbin, x, y, opt) Python: plbin(nbin, x, y, opt)
This function is not used in any examples.
ARGUMENTS
nbin (PLINT, input)
Number of bins (i.e., number of values in x and y arrays.)
x (PLFLT *, input)
Pointer to array containing values associated with bins. These must form a strictly increasing sequence.
y (PLFLT *, input)
Pointer to array containing number of points in bin. This is a PLFLT (instead of PLINT) array so as to allow histograms of proba-
bilities, etc.
opt (PLINT, input)
Is a combination of several flags: opt=PL_BIN_DEFAULT: The x represent the lower bin boundaries, the outer bins are expanded to fill
up the entire x-axis and bins of zero height are simply drawn. opt=PL_BIN_CENTRED|...: The bin boundaries are to be midway between
the x values. If the values in x are equally spaced, the values are the center values of the bins. opt=PL_BIN_NOEXPAND|...: The
outer bins are drawn with equal size as the ones inside. opt=PL_BIN_NOEMPTY|...: Bins with zero height are not drawn (there is a
gap for such bins).
AUTHORS
Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This man page was automatically generated from the DocBook source of the
PLplot documentation, maintained by Alan W. Irwin and Rafael Laboissiere.
SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/resources.
August, 2012 PLBIN(3plplot)