10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey everyone
can you check this script logic ?
it has to restart webservice if found server load is higher than X,
also i have put it in crontab to run every one minute
#!/bin/bash
loadavg=$(uptime | awk -F "." '{ print $1 }' | awk -F ":" '{ print $5 }')
if ; then
pkill -9 httpd
service... (7 Replies)
Discussion started by: nimafire
7 Replies
2. Shell Programming and Scripting
hello,
in a file exist entries in date format YYYYMMDD. i want to find out, if there are dates, which isn't today's date.
file:
date example text
20140714 <= not today's date
20140715 <= not today's date
20140716 <= today's date
my idea is to use Perderabo's datecalc
... (2 Replies)
Discussion started by: bora99
2 Replies
3. Shell Programming and Scripting
hi All,
i have file in which it has 2000 records like,
test.txt
====
2011-03-01
2011-03-01
2011-03-01
2011-03-01
2011-03-01
2011-03-02
2011/03/02
previously i used for loop to find the date check like below,
for i in `cat test.txt`
do
d=`echo $i | cut -c9-10| sed 's/^0*//'`;... (11 Replies)
Discussion started by: mechvijays
11 Replies
4. Shell Programming and Scripting
Hi Experts,
I am checking how to get day in Perl.
If it is “Monday” I need to process…below is the pseudo code.
Can you please prove the code for below condition.
if (today=="Monday" )
{
while (current_time LESS THAN 9:01 AM)
... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies
5. Shell Programming and Scripting
Hi,
In a field, I should receive the date with time stamp in a particular field. But sometimes the vendor sends just the date or the timestamp or correctl the date×tamp. I have to figure out the the data is a date or time stamp or date×tamp.
If it is date then append "<space>00:00:00"... (1 Reply)
Discussion started by: machomaddy
1 Replies
6. Shell Programming and Scripting
hi there
I have file names in different format as below
triss_20111117_fxcb.csv
triss_fxcb_20111117.csv
xpnl_hypo_reu_miplvdone_11172011.csv
xpnl_hypo_reu_miplvdone_11-17-2011.csv
xpnl_hypo_reu_miplvdone_20111117.csv
xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Discussion started by: manas_ranjan
10 Replies
7. UNIX for Dummies Questions & Answers
Hi,
The file contains date at the end, need to check if it is today's date or not. How to check?
Any help.
Regards,
Venkat. (1 Reply)
Discussion started by: venkatesht
1 Replies
8. Shell Programming and Scripting
How to validate the first line from 1-8 position of audit file that contains the script run date... script could run in random dates.
head -1 file1
20090516 100034837SHDHSHE (9 Replies)
Discussion started by: ford2020
9 Replies
9. Shell Programming and Scripting
Hi folks,
I need to write a script that should activate a process according to the current hour.
The process should be activatet only if the hour is between midnight (00:00) and 07:00.
How should I create the condition?
Thanks in advance,
Nir (2 Replies)
Discussion started by: nir_s
2 Replies
10. Shell Programming and Scripting
Hi,
I have a date field in my input file.
I just want to check if its in the format "DD-MM-YYYY".
Is there any command which can achieve this?
Thanks and Regards,
Abhishek (2 Replies)
Discussion started by: AAA
2 Replies