07-29-2012
Did you try executing this script??
For me it seems OK.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need to store the real seconds of the following command in a variable. How could it be done?
time $(dd if=/dev/zero of=/dev/sda1 bs=512 count=2048;sync)
Thanks,
Amio (12 Replies)
Discussion started by: amio
12 Replies
2. Shell Programming and Scripting
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies
3. Shell Programming and Scripting
I intend to find the path/full location of a file(filename given by user thru "read filenme") using "find" or any other command and then store it's output in a variable for some other processing.
But struggling to put all things together (i.e finding the fully qualified location of that file and... (4 Replies)
Discussion started by: punitpa
4 Replies
4. Shell Programming and Scripting
Hello All
Nice to meet you all here in this forum,
it's my 1rst time here
i'm asking about a little issue that i face
i added a ksh script that echo " please insert your name " and store the output to a login.log file.
the script is working fine with normal telnet
but Xstart is not working... (8 Replies)
Discussion started by: islam.said
8 Replies
5. Shell Programming and Scripting
Hello,
My input files are having header/body/footer. The first three digits finds whether the data is header/body/footer. For example,
010AAAAA 20100507 234KB BBBBBBBBBB_20100506.DAT
020CCCCC DDDDDDDDD 373983983 19750426 456.90 ... (1 Reply)
Discussion started by: nvkuriseti
1 Replies
6. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
7. UNIX for Dummies Questions & Answers
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line to... (1 Reply)
Discussion started by: sudeep.id
1 Replies
8. Shell Programming and Scripting
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line... (4 Replies)
Discussion started by: sudeep.id
4 Replies
9. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
10. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 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)