9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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)
Discussion started by: Anusha M
5 Replies
3. 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
4. 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
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
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)
Discussion started by: goddevil
19 Replies
7. Shell Programming and Scripting
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)
Discussion started by: Utherr
1 Replies
8. Shell Programming and Scripting
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)
Discussion started by: singh_king
1 Replies
9. Shell Programming and Scripting
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)
Discussion started by: traxy
1 Replies