Help-prompt for path and take this as input in find command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Help-prompt for path and take this as input in find command
# 8  
Old 01-21-2009
please check this

Sandeep,

Actually you are getting 3 errors .
the last one is very simple and it is just a if else mismatch.

so the proper syntax if you will provide then you will not the "else" error

Please have a glance of the if else syntax....

if condition then

statement
elif
condition then
statement
.
.
.
else
statement
fi

Hint
you are getting this error though you have not placed the "fi" imideate after the else


now lets me explain about the first error.

you have written the statement like

read dir?"give the directory path"

instead of this you can write
echo "please provide the path for process"
read dir

and i think you will solve the second error which is just a replica of the first error which i explained just now.

thanks

sanjay sahoo
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Find command to exclude a specific path

Hi Folks, I want to run the below command and to exclude the specific path like /var/test/support/... . How to achieve using the below command find / -type f \( –perm –4000 –o –perm –2000 \) –print -Siva Please do not use FONT tags inside CODE tags. And, there is usually no reason to... (2 Replies)
Discussion started by: gsiva
2 Replies

2. Red Hat

How to find the path of a command?

Hi guys. I want to know the path of a command. I tried "which" command also . But no luck. Please tell me how to find and update the correct path of the command. Here I'm unable to find the path of ext2online command # resize2fs /dev/vg01/lvora_backup resize2fs 1.39 (29-May-2006)... (3 Replies)
Discussion started by: vamshigvk475
3 Replies

3. Shell Programming and Scripting

Is it possible to prompt for input if not given on command line?

I have a script built that takes the standard inputs $1 $2 $3 after the name and parses some data. hexsite=`echo "obase=16;$1"|bc` hexfix=$(printf "%.3X" 0x$hexsite) if || ;then type=33 elif || ;then type=59 elif ;then type=99 else type=00 fi cat /directory/*.2012$3*| I am... (8 Replies)
Discussion started by: PCGameGuy
8 Replies

4. UNIX for Advanced & Expert Users

Entire Input command not visible in Unix prompt

Hi, While typing the Unix command, entire command is not visible.When the input command is long, it is not visible. I want the entire command to be displayed when i type it. Please help to resolve this issue. Thanks Sampath (7 Replies)
Discussion started by: sampath.giri
7 Replies

5. UNIX for Dummies Questions & Answers

command to find the absolute path

i understand by using the pwd command we get the present working directory. which command is used to find absolute path from home directory to root.. What is absolute path to your and root user's home directory.:confused::confused::confused: (2 Replies)
Discussion started by: shaziafathima
2 Replies

6. AIX

How to find the status of SAN Disc through command prompt

How to find the status of SAN Disc through command prompt (1 Reply)
Discussion started by: AIXlearner
1 Replies

7. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

8. UNIX for Dummies Questions & Answers

create PATH from find command output

I'm trying to autogenerate a PATH variable from the output of a find command as follows: PATH=`find $dir -name "*.jar" | sed 's/$/:/'` The output looks similar like this if I echo it: PATH=/path/to/1.jar: /path/to/2.jar: /path/to/3.jar: I want the path to be on one line. I'm on... (3 Replies)
Discussion started by: rein
3 Replies

9. UNIX for Dummies Questions & Answers

command to find the path of a file

What is the command to find the path of a file if we know the file name and the root directory where the file resides.. For eg. if a file abc.dat resides in /home/mydir/myfiles/. I am looking for a command which will be fired from / directory, takes abc.dat as input and display the path of... (3 Replies)
Discussion started by: abhilashnair
3 Replies

10. Shell Programming and Scripting

How to prompt for input & accept input in ONE line

hi, am a new learner to shell programming. i have a script which will prompt for user to key in their name & display their name afterwards. script ===== echo "Pls enter your name:" read name echo "Your name is $name." output ===== Pls enter your name: Bob Your name is Bob. what... (2 Replies)
Discussion started by: newbie168
2 Replies
Login or Register to Ask a Question
OCF_HEARTBEAT_SAPINS(7) 					OCF resource agents					   OCF_HEARTBEAT_SAPINS(7)

NAME
ocf_heartbeat_SAPInstance - Manages a SAP instance SYNOPSIS
SAPInstance [start | stop | status | monitor | promote | demote | validate-all | meta-data | methods] DESCRIPTION
Resource script for SAP. It manages a SAP Instance as an HA resource. SUPPORTED PARAMETERS
InstanceName The full qualified SAP instance name. e.g. P01_DVEBMGS00_sapp01ci (required, string, no default) DIR_EXECUTABLE The full qualified path where to find sapstartsrv and sapcontrol. (optional, string, no default) DIR_PROFILE The full qualified path where to find the SAP START profile. (optional, string, no default) START_PROFILE The name of the SAP START profile. (optional, string, no default) START_WAITTIME After that time in seconds a monitor operation is executed by the resource agent. Does the monitor return SUCCESS, the start is handled as SUCCESS. This is useful to resolve timing problems with e.g. the J2EE-Addin instance. (optional, string, default 3600) AUTOMATIC_RECOVER The SAPInstance resource agent tries to recover a failed start attempt automaticaly one time. This is done by killing runing instance processes and executing cleanipc. (optional, boolean, default false) MONITOR_SERVICES (optional, string, default disp+work|msg_server|enserver|enrepserver|jcontrol|jstart) ERS_InstanceName (optional, string, no default) ERS_START_PROFILE (optional, string, no default) PRE_START_USEREXIT The full qualified path where to find a script or program which should be executed before this resource gets started. (optional, string, no default) POST_START_USEREXIT The full qualified path where to find a script or program which should be executed after this resource got started. (optional, string, no default) PRE_STOP_USEREXIT The full qualified path where to find a script or program which should be executed before this resource gets stopped. (optional, string, no default) POST_STOP_USEREXIT The full qualified path where to find a script or program which should be executed after this resource got stopped. (optional, string, no default) SUPPORTED ACTIONS
This resource agent supports the following actions (operations): start Starts the resource. Suggested minimum timeout: 180. stop Stops the resource. Suggested minimum timeout: 240. status Performs a status check. Suggested minimum timeout: 60. monitor Performs a detailed status check. Suggested minimum timeout: 60. Suggested interval: 120. promote Promotes the resource to the Master role. Suggested minimum timeout: 320. demote Demotes the resource to the Slave role. Suggested minimum timeout: 320. validate-all Performs a validation of the resource configuration. Suggested minimum timeout: 5. meta-data Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5. methods Suggested minimum timeout: 5. EXAMPLE
The following is an example configuration for a SAPInstance resource using the crm(8) shell: primitive example_SAPInstance ocf:heartbeat:SAPInstance params InstanceName=string op monitor depth="0" timeout="60" interval="120" SEE ALSO
http://www.linux-ha.org/wiki/SAPInstance_(resource_agent) AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors) resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_SAPINS(7)