I'm getting the following errors when I try to write a script to unzip some zip files. When I use the free trial copy of the commerical winzip program, however, they work fine. When I use -l or -t on unzip it indicates no errors. When I use the -o switch interactively from the bash command line it... (1 Reply)
I want to write a bash script to:
1. Send an email from localhost to an external gmail account. (gmail then automatically forwards the message back to a pop account on the same server.
2. Script waits 3 minutes then checks to see if the email arrived, and if not, it sends an email to... (9 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have just gotten into writing bash scripts for a class, part of the assignment is to read and be able to tell... (4 Replies)
Hi all,
This is my sample code in /etc/httpd/conf.d/applications.conf file currently we are creating subdomain mannually for every new subdomain. I want to automate this process througs bash script , how its possible.
<VirtualHost *:80>
ServerName google.com
ServerAlias google.com... (5 Replies)
Hi,
I need to automate some repacking tasks of a boot image for Android
When in command line, I can use this command:
mkbootfs /path/to/root > /path/to/ramdisk-recovery.cpio;However, if I try to run the command from a shell script under Ubuntu, it fails and outputs to stdout instead of the... (27 Replies)
Hello,
I want to write a bash script to delete the content after '#'. However, if '#' appears in a string with "", ignore this. For example,
input file:
test #delete
"test #not delete"
Output file:
test
"test #not delete"
Does anyone know how to write this script?
Thanks (1 Reply)
Hi,
I wanted to load data from HDFS to HIVE by writing bash script.
Description:
I have written a bash script to validate the data and loaded validated data from local file system to HDFS. Now in the same bash script i wanted to load the data from HDFS to HIVE. How can i do it ? Also how tyhe... (2 Replies)
Hello Everyone,
My following script is giving me problems, when the SIP trunk goes down and the telnet session is started and just when the command is about to complete the connection is closed then script restarts.
I have noticed that as soon the script types in "sys re" or "sys rebo" or... (6 Replies)
Discussion started by: jeetz
6 Replies
LEARN ABOUT HPUX
dtsdate
dtsdate(1m)dtsdate(1m)NAME
dtsdate - Sets local clock from a remote dtsd server host
SYNOPSIS
dtsdate [-q] [-s] [-u] remote_host [nsecs]
ARGUMENTS
Queries the difference in time between the local host and the remote host, but does not change the local clock. The returned result (2 if
the time would have been reset, 1 if there was an error, and 0 otherwise) can be used by a script to determine what action to take. Causes
dtsdate to work silently, without showing the time. Shows the time in UTC, rather than in the current time zone. The name or the IP
address of a remote host that has a dtsd server. An integer giving the number of seconds by which the remote and local host times can dif-
fer, without the local host's clock being reset. If nsecs is 0, or if it is not specified, it is treated as if it were extremely large,
and no resetting occurs.
DESCRIPTION
The dtsdate command sets the local clock of a system to be the same as the host remote_host, running a dtsd server. The purpose of dtsdate
is to ensure that clock skew is minimized at initial cell configuration or at host instantiation, because it is difficult to start DCE and
its components if the skew is too great.
Clocks among all DCE components must be within five minutes of each other, to prevent failure of CDS and of security. Some DCE components
have even more stringent requirements. For instance, a DFS file server cannot start if its local host differs from other DFS hosts by more
than ten seconds.
The dtsdate command can be used for adjusting a clock backwards, before DCE is running on a host. Adjusting a clock backwards while DCE is
running can cause many difficulties, because security and file system software generally require system time to increase monotonically.
NOTES
The remote host must be running as a DTS server. This means that the dtsd on that system must have registered the DTS management inter-
face, because dtsdate uses the management call to get the current time from that host.
For dtsdate to be able to set the clock, it must run as a privileged user (root).
EXIT VALUE
If the -q argument is given, dtsdate returns 2 if the remote time and local time differ by more than nsecs, 1 if there was an error, and 0
otherwise.
If the -q argument is not given, dtsdate returns 1 if there was an error, and 0 otherwise.
EXAMPLES
With only the host argument:
dtsdate remotehost
dtsdate prints out the time on the remote host.
In this example:
dtsdate -s -q remotehost 10
dtsdate does not print out the remote host's time. If the times differ by more than 10 seconds, it returns the value of 1, otherwise 0.
In the next example:
dtsdate -s remotehost 10 dtsdate sets the clock if it differed from the remote clock by more than 10 seconds. It does this work
silently, because of the -s option.
The following example shows a shell script that uses the return value of dtsdate:
dtsdate -s -q remhost 10
result = $?
if [ $result -eq 0 ] ; then
echo "Time is within tolerence."
elif [ $result -eq 1 ] ; then
echo "Could not contact remote host." >&2
else # result = 2
if dtsdate remhost 10; then # it failed!
echo "Could not set the clock." >&2
fi
fi
RELATED INFORMATION
Commands: dtsd(1m)dtsdate(1m)