Sponsored Content
Full Discussion: What does -f do
Top Forums UNIX for Dummies Questions & Answers What does -f do Post 11319 by ghoti on Monday 3rd of December 2001 07:28:06 AM
Old 12-03-2001
BASH "if" switches

When I was trying to find these conditional tests, I was finding it very difficult to locate any of these.
Hopefully this list will help for BASH shell users.
Usage:

if [ switch variable ]
eg:

if [ -e "$filename" ]; then
do
something.....
done


where switch and variable are one of the following:

switch variable
-n <variable> tests for non-empty variable
-e <filename> test for existence of file
-L <filename> tests if file is a link to another file
-f <filename> tests if is a regular file
-z <variable> tests if variable is empty
-d <directory> tests for existence of directory
-eq used instead of = (equal)
-neq used instead of != (not equal)
-lt used instead of < (less than)
-gt used instead of > (greater than)
-ge used instead of >= (greater than or equal)
-le used instead of <= (less than or equal)

hope this helps somebody....
 
rt-email-group-admin(8) 				     Request Tracker Reference					   rt-email-group-admin(8)

NAME
rt-email-group-admin - Command line tool for administrating NotifyGroup actions SYNOPSIS
rt-email-group-admin --list rt-email-group-admin --create 'Notify foo team' --group Foo rt-email-group-admin --create 'Notify foo team as comment' --comment --group Foo rt-email-group-admin --create 'Notify group Foo and Bar' --group Foo --group Bar rt-email-group-admin --create 'Notify user foo@bar.com' --user foo@bar.com rt-email-group-admin --create 'Notify VIPs' --user vip1@bar.com rt-email-group-admin --add 'Notify VIPs' --user vip2@bar.com --group vip1 --user vip3@foo.com rt-email-group-admin --rename 'Notify VIPs' --newname 'Inform VIPs' rt-email-group-admin --switch 'Notify VIPs' rt-email-group-admin --delete 'Notify user foo@bar.com' DESCRIPTION
This script list, create, modify or delete scrip actions in the RT DB. Once you've created an action you can use it in a scrip. For example you can create the following action using this script: rt-email-group-admin --create 'Notify developers' --group 'Development Team' Then you can add the followoing scrip to your Bugs queue: Condition: On Create Action: Notify developers Template: Transaction Stage: TransactionCreate Your development team will be notified on every new ticket in the queue. USAGE
rt-email-group-admin --COMMAND ARGS COMMANDS
list Lists actions and its descriptions. create NAME [--comment] [--group GNAME] [--user UNAME] Creates new action with NAME and adds users and/or groups to its recipient list. Would be notify as comment if --comment specified. add NAME [--group GNAME] [--user UNAME] Adds groups and/or users to recipients of the action NAME. delete NAME Deletes action NAME if scrips doesn't use it. switch NAME Switch action NAME from notify as correspondence to comment and back. rename NAME --newname NEWNAME Renames action NAME to NEWNAME. NOTES If command has option --group or --user then you can use it more then once, if other is not specified. AUTHOR
Ruslan U. Zakirov <ruz@bestpractical.com> SEE ALSO
RT::Action::NotifyGroup, RT::Action::NotifyGroupAsComment perl v5.14.2 2013-05-22 rt-email-group-admin(8)
All times are GMT -4. The time now is 11:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy