I went through the post. it is really good one but only datecalc is fulfilling my requirement.
I have tried it by coping to my local machine.
BUT i am working on Qualified environment and can not create such huge function/script.
I tried to extract the date functionality but i couldn't work.
Let me explain you about my requirement.
this is my script
Input file ($TEMP_FILE.)
Input file which is created by keytool and stored in $TEMP_FILE.
Can you help me to highlight those lines from input files which are having "until:somedate" are older then today in red and those about to come in 3 months time as orange.
the time stamp will be taken from input file after the until.
I am really wondering on this forum for getting this done. today it is almost 3 days.
...
Can you help me to highlight those lines from input files which are having "until:somedate" are older then today in red and those about to come in 3 months time as orange.
the time stamp will be taken from input file after the until.
...
so I have about 30k jpg files that I need to rename in one hit. The current filename format is:
x_surname_firstname_y_20141115_OS_(z)
where x, y and z are numbers of various lengths
the new filename format needs to be
surname_firstname_y_OS_(z)
So I basically need to remove the first... (23 Replies)
Hello,
I have a file that has more than 300K records (i.e contains numbers). I need to take these records and than search them in 40 files while each file has more than 1.8 million records.
I wrote a script, but its very slow and takes alot of time. I have tried to split my 300k records in 6... (7 Replies)
Hello,
I have a quick reference question:
I have a very long, but fairly straigtforward script written in c-shell. I was wondering if it is possible to call this script from bash (for ex. having a function in bash script which calls the c-shell script when necessary), and if so, are there any... (1 Reply)
Hello,
I have the following line in one of my shell scripts. It works fine when the search string($SERACH_STR) exists in the logfile($ALERTLOG) but if the search string does not exist this line errors out at run time. Is there a way to make this line return 0 if it is not able to find the... (4 Replies)
Hi all,
I am trying to get the exception count daily from a log file which is more than 1 GB in size.
I am using loops which get the count of the exception and transaction. But i need to take this exception count for a time frame from 5.00 am to 5:00 pm.
I Think I can use to exact the... (4 Replies)
Cool. I played with scripts at home over the weekend. Come to find out not working on other shells. I have linux/bash at home, but now I'm trying on Solaris csh.
How would I write the following script for Solaris C shell?
----------
#!/bin/bash
NBR=231
for ((i = 0; i < $NBR; i++ ))
do... (1 Reply)
Hiii,
i have a doubt here--
I have to take backup of all the files inside directory dir(logs,tmp,corefiles) at the location $BackupLocation.i should take the backup of logs,tmp,corefiles inside the $BackupLocation directory and then remove the files and touch the files inside the directory... (1 Reply)
im trying to run the below if command
ifconfig -a |grep 10.100.120.21
gives me below output
inet addr:10.100.120.21 Bcast:10.100.120.255 Mask:255.255.255.0
i just want a basic shell which says if above exists then continue
how would i do this? (6 Replies)
I gotta make a script to find files, not quite sure whats wrong...
filename is search
i run it
search ass* $HOME
ass* is the filename
and in my script i have...
find $2 -name $1 -print
but it never works, anyone know what i gotta fix?
and does anyone know the difference... (6 Replies)