Beginner at bash scripting - need help with passing arguments
I at the moment, making a simple bash script, capable of setting up an workspace for me, so i don't have to do it manually.. Problem is though i can't seem to provide the bash script any argument, without running into my error checks, checking for input...
Here is the code:
Here is the output I get:
Where start should be the first argument? - What is going wrong here?
Hey Guys,
I am creating a bash script on my freeBSD box, the script should basically ask the user to enter a username and domain. The script will take this information and basically append alot of information to config files so the user can receive email from that domain and create a web site at... (1 Reply)
hy guys,
I have perl script provided to me but i need to convert it into shell .Can you help me in this using sed shell command.
cat /etc/passwd |perl -ne '/^(\w+):\w+: (\w+)/ and print "$1, $2\n";' (1 Reply)
Hi, I'm a beginner at shell scripting, just started scripting in bash a few days ago.
I want to test if the command ls *.jpg returns exit code 2, and if yes I want to execute a new command ls *.jpeg, doing a test on it... and pretty much repeat the procedure.
Is this correct?
#!/bin/bash... (1 Reply)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
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)
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)
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)
Hi All,
I am using the script for creating local queue and passing the arguments while running the script as below
n=0
while
do
e=`expr $n + 3`
echo 'DEFINE QL('$e') MAXDEPTH('$6') MAXMSGL('$7') DEFPSIST('$8') '$9'' | /apps/mqm_opt/bin/runmqsc $2
n=`expr $n + 1`
done
Running the... (5 Replies)
Hello,
I am new to Linux and studying to become a Unix System Admin. I am taking a course in which I was practicing creating a bash script to ping a particular IP address. The script can be found below:
#/bin/bash
echo "Enter the IP address"
read ip
if
then
ping -c 1 $ip
if ;... (3 Replies)
Discussion started by: shah9250
3 Replies
LEARN ABOUT REDHAT
tc-choke
TC(8) Linux TC(8)NAME
choke - choose and keep scheduler
SYNOPSIS
tc qdisc ... choke limit packets min packets max packets avpkt bytes burst packets [ ecn ] [ bandwidth rate ] probability chance
DESCRIPTION
CHOKe (CHOose and Keep for responsive flows, CHOose and Kill for unresponsive flows) is a classless qdisc designed to both identify and
penalize flows that monopolize the queue. CHOKe is a variation of RED, and the configuration is similar to RED.
ALGORITHM
Once the queue hits a certain average length, a random packet is drawn from the queue. If both the to-be-queued and the drawn packet belong
to the same flow, both packets are dropped. Otherwise, if the queue length is still below the maximum length, the new packet has a config-
urable chance of being marked (which may mean dropped). If the queue length exceeds max, the new packet will always be marked (or
dropped). If the queue length exceeds limit, the new packet is always dropped.
The marking probability computation is the same as used by the RED qdisc.
PARAMETERS
The parameters are the same as for RED, except that RED uses bytes whereas choke counts packets. See tc-red(8) for a description.
SOURCE
o R. Pan, B. Prabhakar, and K. Psounis, "CHOKe, A Stateless Active Queue Management Scheme for Approximating Fair Bandwidth Alloca-
tion", IEEE INFOCOM, 2000.
o A. Tang, J. Wang, S. Low, "Understanding CHOKe: Throughput and Spatial Characteristics", IEEE/ACM Transactions on Networking, 2004
SEE ALSO tc(8), tc-red(8)AUTHOR
sched_choke was contributed by Stephen Hemminger.
iproute2 August 2011 TC(8)