The remote servers have thousands of CSV files organized into 3 groups. The user supplies a start and end date and the script returns the records between the supplied dates/times. The script must first determine which files should contain the correct data (determined by file name = $filelist) then determine which lines from those files are between the start and end date (determined by unix timestamp field). The perl functions are to convert the user-supplied start and end date/time to epoch timestamp so time is relative to the server, not the user. This enabled me to skip time zone and DST implementation in the GUI since users can be in different time zones.
I did run the commands from an interactive session, which is a convenient way to test since it mimics what plink is doing. This is where I was seeing the undefined variable messages. When i included a pwd command, I found that the cd command was not executed either.
Since the initial post though, I learned that quoting the heredoc delimiter works. All the commands appeared to have run in bash and provided an output.
Code:
/bin/bash << "eof"
...
"eof"
I'm still not sure why this works but glad it does. I'm still faced with the timestamp conversion issue though. I played around with similar perl commands inside the nawk statement but am not having much luck. This issue doesn't have as big of an impact as did running the commands in bash instead of sh but it would be nice to resolve it.
---------- Post updated at 12:15 PM ---------- Previous update was at 11:57 AM ----------
Edit: I just realized that the login shell for these Solaris 10 boxes is csh rather than sh. Not sure is that changes things much
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Hi friends this is first post i am very new to shell scripting so i require your expertise to do the following thank u
I need to write a shell script which will run the following commands
pg_dump bank > backup(Enter)
Wait for bash prompt to appear coz it indicates that the command is... (23 Replies)
I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config.
I am not sure if I can do this with BASH scripting.
I have set up password less login by adding my public key to authorized_keys file, it works.
I am a little... (1 Reply)
I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Hello All. I suspect that this will be a clear noob question, but I haven't been able to figure it out using the usual methods, so I turn to you.
I've written a script to create input files for the quantum chemistry program NWCHEM. Generally you create an input file and then execute it by... (12 Replies)
run_xfs_fsr is a xfs filesystem maintenance script designed to run under cron. The system is a home theater personal computer running mythbuntu 10.10, and is accessed remotely for these tests. cron runs a script, (xfs_fsr.sh) at 02:30 that runs the subject script under BASH and sets the... (3 Replies)
Hi all. On X11 I'm on a shell ...shell_1 (/bin/bash). From here I want to open another shell window shell_2 who executes commands like "ls -l" or programs like ". /program"... so the "result" of commands shows in shell_2 window and not in shell_1. Is that possible ? (4 Replies)
How to run several bash commands put in bash command line without needing and requiring a script file.
Because I'm actually a windows guy and new here so for illustration is sort of :
$ bash "echo ${PATH} & echo have a nice day!"
will do output, for example:... (4 Replies)
Hi
I need to track what commands run in login session in solaris whether it is root or any normal users in bash shell.
My actual requirement is that when a user (nomal/root) login into the system, whatever commands he run, it should log into file on specified path . I don't require command... (4 Replies)
Discussion started by: hb00
4 Replies
LEARN ABOUT REDHAT
dnssec-signzone
DNSSEC-SIGNZONE(8)DNSSEC-SIGNZONE(8)NAME
dnssec-signzone - DNSSEC zone signing tool
SYNOPSIS
dnssec-signzone [ -a ] [ -c class ] [ -d directory ] [ -s start-time ] [ -e end-time ] [ -f output-file ] [ -h ] [ -i interval ] [
-n nthreads ] [ -o origin ] [ -p ] [ -r randomdev ] [ -t ] [ -v level ] zonefile [ key... ]
DESCRIPTION
dnssec-signzone signs a zone. It generates NXT and SIG records and produces a signed version of the zone. If there is a signedkey file from
the zone's parent, the parent's signatures will be incorporated into the generated signed zone file. The security status of delegations
from the the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a signedkey file
for each child zone.
OPTIONS -a Verify all generated signatures.
-c class
Specifies the DNS class of the zone.
-d directory
Look for signedkey files in directory as the directory
-s start-time
Specify the date and time when the generated SIG records become valid. This can be either an absolute or relative time. An absolute
start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative
start time is indicated by +N, which is N seconds from the current time. If no start-time is specified, the current time is used.
-e end-time
Specify the date and time when the generated SIG records expire. As with start-time, an absolute time is indicated in YYYYMMDDHHMMSS
notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time realtive to the
current time is indicated with now+N. If no end-time is specified, 30 days from the start time is used as a default.
-f output-file
The name of the output file containing the signed zone. The default is to append .signed to the input file.
-h Prints a short summary of the options and arguments to dnssec-signzone.
-i interval
When a previously signed zone is passed as input, records may be resigned. The interval option specifies the cycle interval as an
offset from the current time (in seconds). If a SIG record expires after the cycle interval, it is retained. Otherwise, it is con-
sidered to be expiring soon, and it will be replaced.
The default cycle interval is one quarter of the difference between the signature end and start times. So if neither end-time or
start-time are specified, dnssec-signzone generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. There-
fore, if any existing SIG records are due to expire in less than 7.5 days, they would be replaced.
-n ncpus
Specifies the number of threads to use. By default, one thread is started for each detected CPU.
-o origin
The zone origin. If not specified, the name of the zone file is assumed to be the origin.
-p Use pseudo-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be use-
ful when signing large zones or when the entropy source is limited.
-r randomdev
Specifies the source of randomness. If the operating system does not provide a /dev/random or equivalent device, the default source
of randomness is keyboard input. randomdev specifies the name of a character device or file containing random data to be used
instead of the default. The special value keyboard indicates that keyboard input should be used.
-t Print statistics at completion.
-v level
Sets the debugging level.
zonefile
The file containing the zone to be signed. Sets the debugging level.
key The keys used to sign the zone. If no keys are specified, the default all zone keys that have private key files in the current
directory.
EXAMPLE
The following command signs the example.com zone with the DSA key generated in the dnssec-keygen man page. The zone's keys must be in the
zone. If there are signedkey files associated with this zone or any child zones, they must be in the current directory. example.com, the
following command would be issued:
dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160
The command would print a string of the form:
In this example, dnssec-signzone creates the file db.example.com.signed. This file should be referenced in a zone statement in a named.conf
file.
SEE ALSO dnssec-keygen(8), dnssec-signkey(8), BIND 9 Administrator Reference Manual, RFC 2535.
AUTHOR
Internet Software Consortium
BIND9 June 30, 2000 DNSSEC-SIGNZONE(8)