Sponsored Content
Top Forums Shell Programming and Scripting If condition on shell not working , not sure what is the mistake I am doing? Post 303034954 by Varja on Friday 10th of May 2019 01:24:49 AM
Old 05-10-2019
I was doing some trail and error and found the mistake and came here to mention , but I see @Scrutinizer responded. Thank you !
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If condition not working

Hi Gurus, I have shell script in which i have to check if time is between to possible value or not. For that i am using following line of code if then echo 'Found In Between' echo $ftime ... (5 Replies)
Discussion started by: MANISH KU
5 Replies

2. Shell Programming and Scripting

Help with shell script to check the condition.

:) Hi, I want to script for this scenerio, OSR Settings Scenario : We are looking to find all the *.a files from the following locations in the filesystem of a server. OSR Directories /etc /bin /usr/bin /usr/sbin /var/adm These *.a files should have the permissions on... (12 Replies)
Discussion started by: sakthilinux
12 Replies

3. Shell Programming and Scripting

wild card in if condition not working

Hi, I am using RHEL5. I have following if condition. if In the above condition, if the value of a contains word WARNING, it should match. i.e., WARNING_MESSAGE, CRITICAL WARNING, WARNING ALERT etc. it should match. For b, alert error, ALERT ERROR, ERROR IMMEDIATE ACTION REQUIRED, etc... (2 Replies)
Discussion started by: user7509
2 Replies

4. UNIX for Advanced & Expert Users

If condition and htm not working

checkSync() { CONNECT_STRING=TLDB61/TLDB61@TL10G SQLPLUS_SETTINGS="SET PAGESIZE 0 LINESIZE 1500 ECHO OFF TRIMS ON TAB OFF FEEDBACK OFF HEADING OFF" SQL_RESULT_SYNC_PMCM=`sqlplus -s ${CONNECT_STRING} << EOF ${SQLPLUS_SETTINGS} (SELECT... (2 Replies)
Discussion started by: madfox
2 Replies

5. Shell Programming and Scripting

IF condition against a ARRAY in shell script

Hi, I want to check a particular string inserted by User to be checked against the values i already have in a ARRAY string using IF condition. Is this possible? if yes how to do that. example : i have a,b,c,d,e,f values in a array called values i asked user to enter a value: user entered... (2 Replies)
Discussion started by: kukretiabhi13
2 Replies

6. Shell Programming and Scripting

Using ssh to transfer file not working inside if-condition

Hi all, ssh uname@remote_server 'cat /tmp/remote_file_name > home_dir/a512386/new/local_file_name' The above given command is working fine. but if i try to move the file only if exists in the remote server i.e) giving the same within if condition it executes but the file is not stored in my... (1 Reply)
Discussion started by: Shri123
1 Replies

7. UNIX for Dummies Questions & Answers

While condition in shell script

while do if ;then read driverName else driverName="" fi done can anyone please explain what exactly is happening on 1st line...is it like the conditions being ORed...I have no clue about this. (4 Replies)
Discussion started by: rtagarra
4 Replies

8. Shell Programming and Scripting

Shell variable as awk condition

Hi, I'm trying to automate part of a script which uses awk to grab out some lines of a log file based on certain fields matching. For example, my log file looks something like the following (but 1000s of lines): 1 Tom 123 abc 345 2 Dick 345 abc 678 3 Harry 567 abc 345 4 Tom 345 cde 345... (3 Replies)
Discussion started by: chrissycc
3 Replies

9. Shell Programming and Scripting

Need Help to add Condition in Shell Script..

Hi Team, I m very new to shell scripting , i want to add following condition in my script . Can anybody help me. There are three port in My node "$port" port_A port_B port_C I Want to add following Conditions in my script. If Node is connected to port_A and port_B script... (10 Replies)
Discussion started by: Ganesh Mankar
10 Replies

10. UNIX for Beginners Questions & Answers

If condition is not working and getting error

Hi Team, If condition is not working properly and getting below error # ./score1.sh Enter your score ('q' for quit): 102 Enter your score ('q' for quit): q ./score1.sh: line 9: q: integer expression expected Average is: 102%. Exit. Actual code # Calculate the average of given... (3 Replies)
Discussion started by: Torrid
3 Replies
audomon(1M)															       audomon(1M)

NAME
audomon - audit overflow monitor daemon SYNOPSIS
fss] sp_freq] warning] output] string] DESCRIPTION
monitors the capacity of the current audit trail and the file system on which the audit trail is located. prints out warning messages when either capacity is approaching full. also checks the audit trail and the file system against two switch points: FileSpaceSwitch (FSS) and AuditFileSwitch (AFS). If either switch point is reached, audit recording automatically switches to an alternative audit trail. also takes action at the switch point if there is a task specified with the option. The FileSpaceSwitch (FSS) is specified as a percentage of the total disk space available. When the file system reaches this percentage, looks for a backup audit trail. If the backup audit trail is available, recording is switched from the audit trail to the backup trail. If the backup audit trail is not available, then the auditing system creates a new audit trail with the same base name but a different timestamp extension. The auditing system begins recording to the new audit trail. The AuditFileSwitch (AFS) is specified (using by the size of the audit trail. When the audit trail reaches the specified size, looks for a backup audit trail. If a backup audit trail is available, recording is switched from the audit trail to the backup trail (see audsys(1M) for more information). If a backup audit trail is not available, then the auditing system creates a new audit trail with the same base name but a different timestamp extension. The auditing system begins recording to the new audit trail. issues a warning message, when either switch point is approached. is typically spawned by (as part of the start-up process) when the system is booted up if the parameter AUDITING is set to 1 in file can also be started any time by a privileged user. Once invoked, monitors, periodically sleeping and "waking up" at intervals. Note that does not produce any messages when the audit system is disabled. is restricted to privileged users. Options recognizes the following options: Specify the file or tty to which warning messages are directed. By default, warning messages are sent to the console. Note that the warning messages apply to the diagnostic messages that generates messages concerning the status of the audit system, as well as the messages that the scheduled task (see below) may print out to the standard output and error file. Error messages caused by wrong usage of are sent to the standard output (where is invoked). Note: The file given to the option must exist and must be writable by the user who started (normally root during system startup) according to the system call. See access(2). Specify the FileSpaceSwitch by a number ranging from 0 to 100. When the file system that contains the current audit trail has less than fss percent free space remaining, looks for a backup audit trail. If available, the backup trail is designated as the new audit trail. If no backup trail is available, the auditing system creates a new audit trail with the same base name but a different timestamp extension and begins recording to it. The fss parameter must be a larger number than the min_free parameter of the file system to ensure that the switch takes place before min_free is reached. By default, fss is 20 percent. Specify the wake-up switch-point frequency in minutes. The wake-up frequency is calculated based on sp_freq and the current capacity of the audit trail and the file system. The calculated wake-up frequency at any time before the switch points is larger than sp_freq. As the size of the audit trail or the file system's free space approaches the switch points, the wake-up frequency approaches sp_freq. sp_freq can be any positive real number. The default sp_freq is 1 (minute). Specify that warning messages be sent before the switch points. warning is an integer ranging from 0 through 100. The higher the warning, the closer to the switch points warning messages are issued. For example, warning set to 50 causes warning messages to be sent half-way before the switch points are reached. warning set to 100 causes warning messages to be sent only after the designated switch points are reached and a switch is not possible due to a missing backup trail. By default, warning is 90. Note: The warning message is not sent if the audit trail size grows beyond the switch points in between two consecutive audomon wakeup intervals. In this case, only performs the switch to next audit trail. Make more verbose. This option causes to also print out the next wake-up time. Specify a command line to run after a successful audit trail switch. When the trail is switched from, for example, OldTrail to NewTrail, runs the command: The command string must be specified as an absolute path. Any shell meta-characters and wildcards are expanded by but are expanded by the shell. The command is executed with a real uid and effective uid of 0 in a non-chrooted environment. The command must make minimal assumptions about the environment. For example, the command needs to set environment variables such as its working directory, and its groups. Note: To use this feature, do not explicitly specify the next audit trail using audsys(1M)). EXAMPLES
Example 1: The above command starts the daemon with the following expected behaviors, assuming auditing system was started using o sleeps at least 1 minute at intervals. o When the size of current audit trail reaches 1000 * 90% = 900 kbytes, or the file system that contains the current audit trail has reached (100%-20%) * 90% = 72% full, starts printing out warning messages to the console. o When the size of current audit trail reaches 1000 kbytes, or the file system that contains the current audit trail has reached 100% - 20% = 80% full, switches recording data to: where yyyymmdd_HHMM is replaced by the time when the switch has happened. o After the switch succeeded, invokes the following command: to copy to a remote system assuming that is what the given script intends to do. Example 2: To stop daemon that is already running, use: WARNINGS
All modifications made to the audit system are lost upon reboot. To make the changes permanent, set in AUTHOR
was developed by HP. SEE ALSO
audsys(1M), audit(5). audomon(1M)
All times are GMT -4. The time now is 06:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy