Sponsored Content
Top Forums Shell Programming and Scripting To trigger script on particular instance Post 303026275 by RudiC on Friday 23rd of November 2018 07:07:28 AM
Old 11-23-2018
If you use a while loop instead of the for, you could read the proposed changed config file into different variables and act upon those:
Code:
wd=$(date +%u) 
while IFS="=" read ACTION DAYS
  do  if [[ "$DAYS" =~ $wd ]]

      then echo "$ACTION"
          .
          .
          .
      fi
  done < test.config

You could also modify the crontab settings if the config file is not too long...
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script call from a DB trigger

Has anybody been able to execute a shell script call from a database trigger? If so what are the steps to execute it? Do we have any specific packages in Oracle? Reards, Rahul. (1 Reply)
Discussion started by: rahulrathod
1 Replies

2. Shell Programming and Scripting

Check if trigger Script is running

HI, I have a script which will be running all the time...it is like a trigger.. wakesup every 10 minutes(trigger.sh) executes, and I want to write another script which monitors this script every one hour and if it finds that trigger script is not running it should start it and exit...and here... (9 Replies)
Discussion started by: mgirinath
9 Replies

3. Shell Programming and Scripting

Trigger Shell Script from Current Script

Hello all, I'm new to shell programming and need some help. I would like to set up a step within a shell script to trigger another shell script to run, based on the highest return code generated in the current script. For example, if the highes return code value in the current script is less... (1 Reply)
Discussion started by: mmignot
1 Replies

4. UNIX for Dummies Questions & Answers

Can we trigger an shell script on an event

Hi, My program A updates a log called logA. I have a shell script S that is responsible to send emails reading from the log. I want to trigger execution of the script whenever there is an update to the log. Thanks in advance. (8 Replies)
Discussion started by: cv_pan
8 Replies

5. Shell Programming and Scripting

Trigger a script by consequtive scripts in crontab

Hello Friends, I've been searching solutions for an exceptional backup case recently, I need someone to guide me, suggest a method pls. In a production system we have backup scripts, they are run by cron one after another, and monthly. There is 1 hour difference between each consecutive script... (1 Reply)
Discussion started by: EAGL€
1 Replies

6. Shell Programming and Scripting

Execute shell script from plsql trigger

Hi, I have been assigned a job which requires me to send mails from unix(Mailx) upon on certain actions triggered in the database. On insert/update of a certain field into one of the database tables the shell script present in Unix box responsible to send mail though mailx needs to be triggered... (7 Replies)
Discussion started by: hemant.bs11
7 Replies

7. Shell Programming and Scripting

Shell script trigger using http interface

Hi I have created a shell program, which takes a series of parameters as shown in the below code. Its working good from terminal. My program restorejob.sh -g <NAME> -p <Path-to-search> -r <Path-to-restore> Its working fine from bash shell. I want to extend this functionality like... (1 Reply)
Discussion started by: rakeshkumar
1 Replies

8. Shell Programming and Scripting

Automatic script trigger

Hi, I'm looking for a way to solve the following scenario: A shell should automatically trigger / run when a text file is placed or present at a specific location. My idea - to create a cron / anacron for every minute and inside that i will call a temp script. Temp script will move to my... (9 Replies)
Discussion started by: Gautham
9 Replies

9. Shell Programming and Scripting

Trigger the execution of a script on SFTP Disconnect

Hi Guys, I suspect what I'm trying to do isn't possible, but I'm hoping someone can either confirm this or point me in the right direction. We have a third-party application which transfers a collection of files to our SFTP server ( Ubuntu 12.04 with OpenSSH ) . Once the app disconnects, we... (13 Replies)
Discussion started by: jamesdrinkwater
13 Replies

10. Shell Programming and Scripting

Trigger script based on condition

Hi Guys, I am having below code which runs based on condition, Is it possible to check condition at the time of trigger code=$1 if ;then nohup sh script.sh $val 1 & fi I need to trigger if the $code = JP then only to trigger nohup sh script.sh $val 1 & My try but wanted... (4 Replies)
Discussion started by: Master_Mind
4 Replies
unbound-checkconf(8)						  unbound 1.4.17					      unbound-checkconf(8)

NAME
unbound-checkconf - Check unbound configuration file for errors. SYNOPSIS
unbound-checkconf [-h] [-o option] [cfgfile] DESCRIPTION
Unbound-checkconf checks the configuration file for the unbound(8) DNS resolver for syntax and other errors. The config file syntax is described in unbound.conf(5). The available options are: -h Show the version and commandline option help. -o option If given, after checking the config file the value of this option is printed to stdout. For "" (disabled) options an empty line is printed. cfgfile The config file to read with settings for unbound. It is checked. If omitted, the config file at the default location is checked. EXIT CODE
The unbound-checkconf program exits with status code 1 on error, 0 for a correct config file. FILES
/etc/unbound/unbound.conf unbound configuration file. SEE ALSO
unbound.conf(5), unbound(8). NLnet Labs May 24, 2012 unbound-checkconf(8)
All times are GMT -4. The time now is 02:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy