Sponsored Content
Top Forums Shell Programming and Scripting Facing problem in checking the directory existence Post 302320422 by tonan on Thursday 28th of May 2009 02:53:48 AM
Old 05-28-2009
I am not able to understand how is the script reading the directory name from the property file.

what are the params you are passing, the first param seems to be the dir that you are passing. Can you please give some more input and an example of what you are passing
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking file existence

Hi, My requirement was to check the existence of a file having a specified pattern.The way i tried to achieve this was if ; then echo "File found" fi an example file having this pattern was 'ilvs_trace01.0124'. it will vary... (3 Replies)
Discussion started by: DILEEP410
3 Replies

2. Shell Programming and Scripting

Checking the existence of a file..

Hi, I am trying to check for the existence of a file using the 'test' and the file existence options. When trying to check for a file with a space in between e.g 'Team List', it gives the following error. learn1: line 3: test: `Team: binary operator expected I am pasting my code below as... (7 Replies)
Discussion started by: igandu
7 Replies

3. Solaris

checking for existence of table in oracle

how do i check from solaris for existence of table in oracle..?? the requirement is, that if the table does not exist, it is created.. :confused: The logic will be something like: if table exists then insert into table else create table insert into table end if (0 Replies)
Discussion started by: kjs
0 Replies

4. Shell Programming and Scripting

Checking Multiple file existence

Hi, I want to check multiple files exist or not in a single if statement in korn Shell:confused:. Please help me Thanks (1 Reply)
Discussion started by: lathish
1 Replies

5. Shell Programming and Scripting

Checking the existence of a file before getting last modified

Hi, I am trying to check the existence of a file, from a list of possible filenames: status-A status-B status-C before retrieving the last modified datetime using ls, I want to check it exists or ls will throw an error. So I have tried this: if ; then ls status-* fi But the if... (3 Replies)
Discussion started by: LostInTheWoods
3 Replies

6. Shell Programming and Scripting

checking the file existence using ssh

Hi Can any body say me the reason for below error ssh -o 'StrictHostKeyChecking no' user@client ' && print "1"' I am getting error as "Missing ]":wall: (6 Replies)
Discussion started by: ramesh12621
6 Replies

7. Shell Programming and Scripting

Checking existence of file using awk

Hi, I need to check whether a particular file exists ot not using awk. Can anyone help me please? For Example:script that i am using: awk '{filename =$NF; rc=(system("test -r filename")) print $rc;}' "$1" is not working. Here I am passing a text file as input whose last word contains a... (6 Replies)
Discussion started by: manish007
6 Replies

8. Shell Programming and Scripting

Checking file existence along with condition

Hi am trying to write a script which find the existence of a file from a find command output and perform a task if the file exists. Help me out with the correct syntax . Am trying with the following one but unable to get the output. if then <some tasks> else echo "file not exists" fi (5 Replies)
Discussion started by: rogerben
5 Replies

9. Shell Programming and Scripting

Checking for the file existence

Hi, I have written a script to validate the data file by referreing to the configurtion file. And moving the validated good records and bad records into HDFS. Suppose after 15 mins if i receive one more data fie,then after validation the good and bad records shold be stored in hadoop with the... (8 Replies)
Discussion started by: shree11
8 Replies

10. Shell Programming and Scripting

Command script for checking a file existence

Hello, I have a directory where sometimes appear a certain file name - and I'd like to be notified by email when that happens... so what command or script I may use? e.g. if there's a file named "adam" in the directory named "dir1" then send a mail to "abc@abc.com".. it needs to permanently... (5 Replies)
Discussion started by: netrom
5 Replies
ldi_prop_exists(9F)					   Kernel Functions for Drivers 				       ldi_prop_exists(9F)

NAME
ldi_prop_exists - Check for the existence of a property SYNOPSIS
#include <sys/sunldi.h> int ldi_prop_exists(ldi_handle_t lh, uint_t flags, char *name); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI) PARAMETERS
lh Layered handle. flags Possible flag values are some combination of: LDI_DEV_T_ANY Match the lookup request independent of the actual dev_t value that was used when the property was created. The flag indicates any dev_t value (including DDI_DEV_T_NONE) associated with a possible property match satisfies the matching criteria. DDI_PROP_DONTPASS Do not pass request to parent device information node if the property is not found. DDI_PROP_NOTPROM Do not look at PROM properties (ignored on platforms that do not support PROM properties). name String containing the name of the property. DESCRIPTION
ldi_prop_exists() checks for the existence of a property associated with a device represented by the layered driver handle, regardless of the property value data type. Properties are searched for based on the dip and dev_t values associated with the layered handle, and the property name. This association is handled by the layered driver infrastructure on behalf of the consumers of ldi_prop_exists(). The property search order is as follows: 1. Search software-properties created by the driver. 2. Search the software properties created by the system (or nexus nodes in the device info tree). 3. Search the driver global properties list. 4. If DDI_PROP_NOTPROM is not set, search the PROM properties (if they exist). 5. If DDI_PROP_DONTPASS is not set, pass this request to the parent device information node of the device represented by the lay- ered handle. 6. Return 0 if not found and 1 if found. Typically, the specific dev_t value associated with the device represented by the layered handle (ldi_handle_t) is used as a part of the property match criteria. This association is handled by the layered driver infrastructure on behalf of the consumers of the ldi property look up functions. However, if the LDI_DEV_T_ANY flag is used, the ldi property lookup functions will match the request regardless of the dev_t value associ- ated with the property at the time of its creation. If a property was created with a dev_t set to DDI_DEV_T_NONE, the only way to look up this property is with the LDI_DEV_T_ANY flag. PROM properties are always created with a dev_t set to DDI_DEV_T_NONE. name must always be set to the name of the property being looked up. RETURN VALUES
ldi_prop_exists() returns 1 if the property exists and 0 otherwise. CONTEXT
This function may be called from user or kernel context. EXAMPLE
The following example demonstrates the use of ldi_prop_exists(). /* Determine the existence of the "interrupts" property */ ldi_prop_exists(lh, LDI_DEV_T_ANY|DDI_PROP_NOTPROM, "interrupts"); SEE ALSO
ddi_prop_exists(9F) Writing Device Drivers SunOS 5.11 3 June 2003 ldi_prop_exists(9F)
All times are GMT -4. The time now is 04:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy