Sponsored Content
Full Discussion: Multiple if statements
Top Forums UNIX for Dummies Questions & Answers Multiple if statements Post 302867523 by RavinderSingh13 on Thursday 24th of October 2013 10:42:28 AM
Old 10-24-2013
kindly let us know the exact requirement for same. As per your code only I have given the solution. Please be more specific in your requirement.


Thanks,
R. Singh
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

multiple conditions in if statements

Hi all, I'm confused about the proper syntax for multi-conditional if then statements. I'm trying to set limitations on info input on the command line.. i.e. if ] ;then $x=$vr1 else print "You have entered an invalid option." Can someone please clue me in on what is wrong with my syntax;... (3 Replies)
Discussion started by: tim mauger
3 Replies

2. Shell Programming and Scripting

multiple 'if' statements out of array

I want to do multiple comparisons on a series of numbers from an array: I send the numbers in file1 through want to print out some info from file2 based on some conditions. The syntax just isn't correct??? awk ' NR==FNR{ a=$0 next ... (2 Replies)
Discussion started by: dcfargo
2 Replies

3. Shell Programming and Scripting

How do I execute multiple statements within If then else

Please help me. I have been doing this for several hours. Here is the code if then echo a b c d >> file.txt echo 1111 >> file.txt fi The reason I want the two echo is because I want these statements printed on multiple lines. I keep getting error . First it tells me... (2 Replies)
Discussion started by: asemota
2 Replies

4. Shell Programming and Scripting

Running multiple if statements

Hi, Hav automated a process, and it is working fine. for first process alone status = ` ps -ef |grep a ` if then echo " Success" > temp/logfile else echo " Failure" > temp/logfile fi Now I hav to write script to automated some 2 process and then send mail using cron.. ... (5 Replies)
Discussion started by: NehaKrish
5 Replies

5. Shell Programming and Scripting

execute multiple statements in if-else

how can we execute multiple statements in else condition i have if then statement else statements fi in else condition i have multiple statements but it executing only one statement is there any way to execute multiple statements (4 Replies)
Discussion started by: nani1984
4 Replies

6. Shell Programming and Scripting

multiple echo statements in if condition

Hi , I have a peculiar problem. i have an if block like this if ; then echo " todays date is " ${date} >> log_file echo " file count is " $ count >> log_file mv filename1 filename 2 else echo "no files available ">> log_file fi the echo statement "no files available " is not... (2 Replies)
Discussion started by: wizardofoz
2 Replies

7. Shell Programming and Scripting

Multiple if Statements

Hi All, I need to check for 3 conditions and if all the 3 are not satified need to say that services are not running.... is the below code correct. #********** Check to see if Service 1 is still running************** if then echo "$datetimestamp: Service1 is not running" >>... (4 Replies)
Discussion started by: ch33ry
4 Replies

8. Shell Programming and Scripting

Multiple If statements in bash problem

Hi everyone, May you help me with the correct syntax of the follow bash statements please X=10 if ]; then echo "The value is between 1 and 5" for ((i=1;i<=${X})); do echo $i done else if ]; then echo "The value is between 6 and 10" for ((i=1;i<=${X})); do ... (5 Replies)
Discussion started by: Ophiuchus
5 Replies

9. Shell Programming and Scripting

Multiple while statements?

I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop inside of a while loop, but I have no idea how to do it properly. Here's what I have so far: ... (3 Replies)
Discussion started by: nickzourdos
3 Replies

10. Shell Programming and Scripting

Using multiple 'for' statements

Hello, I am new to scripting and I am trying to write a simple script that creates users and adds their passwords from two files; one a user list file and another a password list file. For example, I have two files already. $ cat file1 andy stephane aby paul $ cat file2 123 234... (4 Replies)
Discussion started by: FemoTheDon
4 Replies
asctl(1)						    BSD General Commands Manual 						  asctl(1)

NAME
asctl -- App Sandbox Control Tool SYNOPSIS
asctl [-p] [--container-path <path>] command [arguments] DESCRIPTION
Many commands require an application specification as one of their arguments. Applications can be specified any of the following ways: <name> The application name as it appears in the Applications folder, with or without the .app extension. For example, "TextEdit". <path> The path to the application binary or bundle. For example, "/Applications/TextEdit.app". --file <path> Explicitly indicate the following argument is to be interpreted as the path to the application binary or bundle. The --file flag removes ambiguity when an argument can be interpreted as either an application name or a valid path to an application. For example, "--file /Applications/TextEdit.app". --bundle <bundle Id> Interpret the following argument as the bunder identifier of the application. For example, "--bundle com.apple.TextEdit". --pid <process Id> Interpret the following argument as the process identifier of a running application. For example, "--pid 1". GENERAL COMMANDS
help Prints a summary of commands and their behaviours. sandbox check <app specification> Determines with the given application is signed with App Sandbox entitlements. In addition, if the application is specified by pid using the --pid syntax, prints out whether the application is actually running with App Sandbox enabled, a traditional sandbox, or no sandbox at all. CONTAINER MANAGEMENT COMMANDS
The following commands manage filesystem containers for sandboxed apps. container path <app specification> Print the path to the application's container. container create <app specification> Create and initialize the application's container. Containers are normally created automatically when sandboxed applications are run. This command creates the container for an application without running the application. container upgrade <app specification> Upgrade the application's container to the current container schema. Existing containers are normally automatically upgraded to the latest container schema when their associated applications are run. This command upgrades an existing container without running the associated application. CONTAINER ACL MANAGEMENT COMMANDS
Each container has an access control list comprised of code requirements. A sandboxed application must satify one or more of the code requirements on their container in order to run. The following commands manipulate the container's access control list: container acl add <app specification> Update the access control list for the application's container to include the application's designated code requirement. container acl add <app specification> <code requirement> Update the access control list for the application's container to include the specified code requirement. container acl update <app specification> Update the access control list for the application's container such that it consists of only the application's designated code requirement. Any other code requirements will be removed from the ACL. container acl list <app specification> Print list of code requirements in the access control list for the given application's container. container acl validate <app specification> Validate the application against each of the code requirements in its container's access control list. Each code requirement in the ACL is labeled with one of the following: [FAIL] application does not validate against code requirement. [VALID] application validates against code requirement. [EXACT] application validates against code requirement and code requirement is the same as the application's designated code requirement. container acl verify <app specification> Synonym for acl validate. SYMLINK SUPPORT COMMANDS
App Sandbox will follow any symlinks in the paths to users' home directories. In addition, it has a whitelist of other locations where it will acknowledge and honor symbolic links. Any symlinks not in this whitelist will not be followed and, as a result, App Sandboxed applica- tions will not have access to the paths that the symlinks refer to. The following command displays the whitelist of paths where App Sandbox will acknowledge symlinks at: symlink list <path ...> Display the list of paths that App Sandbox searches for symlinks and, for any paths that are symlinks, display where the symlinks currently resolve to. DIAGNOSTIC COMMAND
Collect diagnostic information related to Application Sandboxing and containers. The information is collected into a single file that can be sent to Apple to aid in diagnosing problems when an application runs inside of a sandbox. Should you choose to send the diagnostic informa- tion to Apple, then you must agree to this disclaimer: This diagnostic tool generates files that allow Apple to investigate issues with your computer and help Apple to improve its products. The generated files may contain some of your personal information, which may include, but not be limited to, the serial number or similar unique number for your device, your user name, your file names or your computer name. The information is used by Apple in accordance with its pri- vacy policy (www.apple.com/privacy) and is not shared with any third party. By enabling this diagnostic tool and sending a copy of the gen- erated files to Apple, you are consenting to Apple's use of the content of such files. Additional information concerning a specific application can be gathered via the app subcommand. This command must be run as 'root'. The following command collects diagnostic information: diagnose [--no-compress | --no-disclaimer | --no-reveal | --no-verbose] [app <app specification>] Collection diagnostic information. Outputs the path to the folder or file containing the information. Optional arguments: --no-compress Do not compress the folder containing the dianostic files into a Zip file. --no-disclaimer Do not show the disclaimer. Use of this option constitutes acceptance of the disclaimer. --no-reveal Do not reveal the resulting diagnostic file in Finder. --no-verbose Do not show verbose output while running the diagnostic. Optional subcommand: app <app specification> Specify an application for which additional information will be gathered. GLOBAL OPTIONS
-p By default, asctl displays paths relative to the user's home directory. This flag causes any paths in the output to be displayed as absolute paths instead. SEE ALSO
codesign(1) HISTORY
The asctl command first appeared in Mac OS X Version 10.7. BSD
February 7, 2012 BSD
All times are GMT -4. The time now is 11:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy