Search Results

Search: Posts Made By: jag7720
923
Posted By jag7720
something odd with my awk script
The code I am using

#!/bin/sh

for FILE in *.cfg; do
awk '{
print;
if ($1 == "host_name") store_name = $2;


if ($1 == "register") { printf("\t\t parents\t\t\t %s-ilo\n", store_name); }...
29,712
Posted By jag7720
Tried that with the && test $(date +\%a) !=...
Tried that with the &&

test $(date +\%a) != Sun || ...

seems to work

Thanks for the help... but you are right.... we are not going to put that in the cron but rather in the script and just...
29,712
Posted By jag7720
well, you were right, it fired last night. ...
well, you were right, it fired last night.

So where did I go wrong?

i found this while searching around... will this work?

1 0 22-28 * * test 'date +\%a' != Sun || /path/to/script >/dev/null...
29,712
Posted By jag7720
1 0 22-28 * 0 /path/to/script.sh minute=1 ...
1 0 22-28 * 0 /path/to/script.sh
minute=1
hour=0
date range=22-28
month=all
day of week=sunday

the 4th Sunday of every month always falls in that date range.
1,390
Posted By jag7720
Change .bashrc on a list of hosts
Hi,

My scripting skills are somewhat basic...

I need a way to log into a list of hostname/IPs as a user, su to root and then create/append root's .bashrc

Thanks
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 02:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy