When I run the below script from the cmd line it works as expected. The script will accurately detect whether an ssh connection is available. But, when I put this same script in cron it fails every time, even when an ssh connection is available. Any ideas? Or possibly a better method to...
Below is an example of a case script I'm using. The script works as expected, except for the q (quit/exit) option; it won't exit. Actually the script does exit properly if I choose q before choosing any other option. Unlike if I choose 2, then try and q, it wont work. I believe it has...
First off, this site is such an amazing resource. Thanks to you all.
Suppose I have an input.file that looks like:
homer: server1:/var/legato/rman/bin/ebuarch.PRTLDEV
homer: server1:/var/legato/rman/bin/ebuarch.PRTLPROD
homer: server1:/var/legato/rman/bin/ebuarch.PRTLQA
homer...
Below is a portion of a (ksh) case script. The way the menu works now is, via the select statement I can only choose one of the numbered options at a time. Is there a way to choose multiple options?
For example, if I run the script and choose option 3, I will be presented with a list that...
Suppose I have a line numbered (error.dat) file that looks like:
1 : Jun 18 12:05:52 host: hostname1:/some/path/here/some.file
2 : Jun 18 12:05:52 host: hostname2:/some/path/here/some.file
3 : Jun 18 19:38:49 host: hostname3:/some/path/here/some.file
And I have an (error.ksh) script that...
Below is what I have. This works well, but it is finding and renaming the file based on alpha/numeric order, not by timestamp. I would like it to find and rename by oldest timestamp regardless of filename.
forfiles -p"P:\DATA\Corporate\Scripts\rename" -v -ma*.xml -d- -c"cmd /c ren @FILE...
Hello all.
Looking for help using the forfiles command.
Goal: To find and rename the 'oldest file only' in a given directory. I have the find and rename part down, but am having trouble identiying the oldest file by date/time.
I imagine I will have to use the @FTIME and/or @FDATE. Thanks in...
Hello all.
Looking for help using the forfiles command.
Goal: To find and rename the 'oldest file only' in a given directory. I have the find and rename part down, but am having trouble identiying the oldest file by date/time.
I imagine I will have to use the @FTIME and/or @FDATE. Thanks in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.