02-12-2017
VBE then the 'script' command can not be used in a executable script?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies
2. Shell Programming and Scripting
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies
3. Shell Programming and Scripting
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies
4. Shell Programming and Scripting
I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes
CC=`which gcc`
CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies
5. Shell Programming and Scripting
Input is list of Server's, script is basically to remove old_rootvg, So it should check first command "alt_rootvg_op -X old_rootvg" if it passes move to next server and starts check and if it fails moves to other command "exportvg old_rootvg" for only that particular server. I came up with below,... (6 Replies)
Discussion started by: aix_admin_007
6 Replies
6. Shell Programming and Scripting
Hi All,
I have a question related to Shell scripting. In my shell script, I have following two commands in sequence:
sed 's/^/grep "^120" /g' $ORIGCHARGEDAMTLIST|sed "s;$;| cut -f$FIELD_NO1 -d '|' | awk '{ sum+=\$1} END {printf (\"%0.2f\\\n\", sum/100)}' >$TEMPFILE
mv $TEMPFILE $ORIGFILE... (3 Replies)
Discussion started by: angshuman
3 Replies
7. UNIX for Dummies Questions & Answers
Hi Guys,
I like to output every command executed in the script to a file.
I have tried set -x which does the same.
But it is not giving the logs of the child script which is being called from my script.
Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies
8. UNIX for Dummies Questions & Answers
Hi everyone
I have a problem with my script
If I try directly this command
/usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz
It works
But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
9. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
LEARN ABOUT HPUX
cmrunserv
cmrunserv(1m) cmrunserv(1m)
NAME
cmrunserv - run a service from the high availability package run script
SYNOPSIS
cmrunserv [-v] service_name service_command_string
cmrunserv [-v] [-r restarts] service_name service_command_string
cmrunserv [-v] [-R] service_name service_command_string
DESCRIPTION
cmrunserv is used in the high availability package run script to run a service.
To start package's service, a user must either be superuser(UID=0), or have an access policy of FULL_ADMIN allowed in the cluster configu-
ration file. See access policy in cmquerycl(1m) or cmmakepkg(1m).
If the service process dies, cmrunserv updates the status of the service to down. The cluster software will recognize the change in status
and execute the normal package recovery sequence. This includes executing the package halt script, determining if the package can be run
on a different node, and, if so, executing the package run script on the new node.
Should the service_command be halted by the cmhaltserv command, a SIGTERM signal will be sent to the process. This executable or shell
script should be able to handle a SIGTERM signal and execute a graceful shutdown performing any cleanup necessary. If the process ignores
the SIGTERM, a SIGKILL will be sent to the process. If a SIGKILL is sent, the process will die immediately and will be unable to perform
any cleanup.
Options
cmrunserv supports the following options.
-v Verbose output will be displayed.
-r restarts
Indicates that the service should be automatically restarted by the cluster software if it fails, without halting the
package. restarts indicates how many times the service may fail before the package should be halted.
-R Indicates the service should be restarted an unlimited number of times if it fails.
service_name
Name of the service as it exists in the package configuration information.
service_command_string
Process string to be started. This includes the process name and any arguments necessary for the process to run. The
process name must be a full path, may be either a command name or a shell script, and must be executable.
RETURN VALUE
cmrunserv returns the following values:
0 Successful completion.
1 Command failed.
EXAMPLES
To run the service command string /var/opt/db/database1 under the service name db1, do the following:
# Run the process /var/opt/db/database1
cmrunserv db1 /var/opt/db/database1
This line should only be executed within a package run script.
AUTHOR
cmrunserv was developed by HP.
SEE ALSO
cmhaltserv(1m), cmquerycl(1m), cmmakepkg(1m), cmmodnet(1m).
Requires Optional Serviceguard Software cmrunserv(1m)