07-03-2007
Thanks for all the help! It works now.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi;
If I do something like this.
dftotalsize=0;export dftotalsize;df -k | grep \/db001 | awk '{print $4}' | while read theinput \
; do export $theinput; dftotalsize=`expr $dftotalsize + $theinput`; export dftotalsize; echo $dftotalsize; done ; echo `expr $dftotalsize \/ 1024 \/ 1024 "GB"
Is... (4 Replies)
Discussion started by: myjess
4 Replies
2. Shell Programming and Scripting
hi guys,
my ksh script is calling another script. The other script expects user to press CNTR-C, and does not return to the prompt.
in my script, I want to call the other script, but somehow don't want it to wait forever, I want to return to my script.
e.g.
script2.ksh outputs:
"No... (2 Replies)
Discussion started by: JamesByars
2 Replies
3. Shell Programming and Scripting
Hi all,
I'm trying to run an sql inside a loop which looks like this
#!bin/ksh
while IFS=, read var1 var2
do
sqlplus -s ${USERNAME}/${PASSWORD}@${ORACLE_SID} << EOF
insert into ${TABLE}
(
appt_date
)
values
(
'${var1 }'
);
... (6 Replies)
Discussion started by: ryukishin_17
6 Replies
4. Shell Programming and Scripting
Shell Scipt: temp.sh
su - <$username>
expect pass.exp
Expect script: pass.exp
#!/usr/bin/expect -f
# Login
#######################
expect "Password: " send "<$password>\r"
it comes up with Password: but doesnt take password passed throguh file. (2 Replies)
Discussion started by: bhavesh.sapra
2 Replies
5. Shell Programming and Scripting
:oi was trying to write a script to format output of a command in ksh which has output as below:
so i used :
to get
which i require at all times. But problem occurs when status part changes. above output i get when status is SU (success).If the status is IN (inactive), output of... (1 Reply)
Discussion started by: pr5439
1 Replies
6. Ubuntu
Hello,
If i run the following script from the cmdline it works just fine however if i run it via root cronjob it doesn't write to the file at all. It is chmod 777 now so shouldnt be any right issues.
Shellscript looks like this:
/usr/bin/top -b -n 1 -u nagios >> /var/log/test.log
Cronjob... (7 Replies)
Discussion started by: heady89
7 Replies
7. Shell Programming and Scripting
Hi,
I am a bit confused ,why would a sed command work fine outside of ksh script but not inside.
e.g
I want to replace all the characters which end with a value and have space at end of it.
so my command for it is :
sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name
This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies
8. Shell Programming and Scripting
Hi,
I have a text file, which I am trying to parse.
File contents:
BEG
Id Job1
Id Stage1
1
EN
Id Job2
Id Stage2
BEG
Id2 Job3
Id Stage4
2
EN
I have to process the data in this between every BEG and EN. so I am trying to restrict the range and inside every... (1 Reply)
Discussion started by: Kulasekar
1 Replies
9. Shell Programming and Scripting
I am trying to execute expect command inside by small bash script to login into servers using key authentication method. My script is as follows:
#!/bin/bash
HOST=$1
/usr/bin/expect -c "
spawn ssh -i /root/.ssh/id_rsa root@$HOST
expect -exact "Enter... (3 Replies)
Discussion started by: John Wilson
3 Replies
10. Shell Programming and Scripting
I am new at scripting. I have a file that each line is the shortname for a server.
ie -
Server1
Server2
Server3
I want to read in that file, do a nslookup and print the FQDN to a file.
I added an echo statement to make sure my variable was being read and changing. But the nslookup... (5 Replies)
Discussion started by: kellyhkc
5 Replies
LEARN ABOUT CENTOS
gvmap.sh
GVMAP.SH(1) General Commands Manual GVMAP.SH(1)
NAME
gvmap.sh - pipeline for running gvmap
SYNOPSIS
gvmap.sh [-vV?] [ options ] [ -o outfile ] [ files ]
DESCRIPTION
gvmap.sh takes as input a graph in DOT format, performs a layout, runs the output through gvmap and renders the output. At some point, it
is hoped to integrate all of these tasks into gvmap.
OPTIONS
The following options are supported:
-a k The integer k specifies the average number of artificial points added along the bounding box of the labels. Such artificial points
are added to avoid a country boundary cutting through the boundary box of the labels. Computing time is proportional to k; hence,
for large graphs, a small value of k is suggested. If k = -1, a suitable value of k is automatically selected based on the graph
size. By default k = -1.
-K layout
specifies which program should be use for the initial layout. By default, sfdp is run. Also by default, the layout is passed the
flag -Goverlap=prism. This can be overridden using a -g flag.
-T format
specifies the final output format. This works the same way as the -T flag for any Graphviz layout program.
-N attr=val
specifies the setting of a default node attribute during the rendering phase. This works the same way as the -N flag for any
Graphviz layout program.
-G attr=val
specifies the setting of a graph attribute during the rendering phase. This works the same way as the -G flag for any Graphviz lay-
out program.
-E attr=val
specifies the setting of a default edge attribute during the rendering phase. This works the same way as the -E flag for any
Graphviz layout program.
-n attr=val
specifies the setting of a default node attribute during the layout phase. This works the same way as the -N flag for any Graphviz
layout program.
-g attr=val
specifies the setting of a graph attribute during the layout phase. This works the same way as the -G flag for any Graphviz layout
program.
-e attr=val
specifies the setting of a default edge attribute during the layout phase. This works the same way as the -E flag for any Graphviz
layout program.
-A flag
specifies a flag to be passed to gvmap. For example, gvmap.sh -Ae -As3 causes gvmap -e -s3 to be run.
-v Set verbose mode.
-V Print version information and exit.
-? Print usage information and exit.
EXAMPLES
The following invocation creates a map with edges in semi-transparent light gray and nodes laid out using sfdp:
gvmap.sh -Ae -Ecolor=#55555522 -Tpng foo.gv > foo.png
It is equivalent to running the pipeline
sfdp -Goverlap=prism foo.gv | gvmap -e | neato -n2 -Ecolor=#55555522 -Tpng > foo.png
AUTHOR
Emden R. Gansner <erg@research.att.com>
SEE ALSO
gvmap(1), sfdp(1), neato(1), gvpr(1)
E. R. Gansner, Y. Hu, S. G. Kobourov, "GMap: Visualizing graphs and clusters as maps," Proc. Pacific Vis. 2010, pp. 201-208.
31 March 2011 GVMAP.SH(1)