What OS version and which shell? You can also try awk to replace grep.
edit: to be more specific about matching, if your record file is for instance delimited you can check a specific field. for instance finding a username in /etc/passwd. /etc/passwd is delimited with : and the username is the first field
Last edited by neutronscott; 05-09-2012 at 10:15 PM..
I want to find the size of particular file exists in a particular directory
and i wnt to zip it.
In the below mentioned code it should check the MQ.log in the
particular directory.Please correct my code so that it will check
for particular MQ.log but i could not able to check whether
the... (9 Replies)
So I have a lot of Java applications on my servers all having their own folder from the applications subdirectory. Now, I need to do the following.
Search all the applications subdirectories for message.jar.
If the message.jar file exists, I need to search the application directory for... (1 Reply)
Hi,
I'm trying to write a bit of code that will check if a file exists and then archives the file
Im trying to use the following if statement without success..
if
then
mv filename archive/filename
else
echo "no filename exists"
fi
Should the file name be... (3 Replies)
I will have to process multiple files with same name everyday.
My requirement is:
If on a certain day I see that filename.txt exists then the contents of the filename.txt would be added/append
to the former file contents.Each time it sees the file the content would be added.But the header ... (8 Replies)
Hi All,
If i run below copy command, it works absolutely fine,
/opt/csw/bin/scp axetlxyz01:/opt/data/test/QURIES* ./input
I want to make the above line better, by adding an IF statement, want to check if there is any file exists with name QURIES*.* then i need to copy that.
if
... (7 Replies)
Hey all,
I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far..
#! bin/bash
echo "Enter desired file"
read "$file"
if ... (5 Replies)
Hi
I have a file
name1 xxxxx
name1 xxxxx
name1 yyyyy
name 1 zzzzz
name1 Uniprot Id 1234
name2 sssss
name2 eeeee
name2 bengamine
name2 Uniprot Id 3456
......................and so on
I have to capture Uniprot IDs only in a separate file so that output contain only
... (20 Replies)
Hi all
I have a list of file names in array. But this file names are not exact. so i want to search whether a file exists or not using regular expression.
code snippet:
if ;
then
echo "File exists"
else
echo "File does not exits"
fi
over here "*EQST*" should be treated as a regular... (4 Replies)
Is there an easy way of checking for the existence of a file that ends with the extension .order and if it exists do something? if not do nothing (7 Replies)
Good Morning All,
I'm a novice and please excuse me if i did miss some of the forum rules.
What my intention is, i have a file (services) residing @ /u01/Oracle/services.
I know i can use the find command to find the "service" file. I get this file from a windows box and there is no certain... (8 Replies)
Discussion started by: thinkingeye
8 Replies
LEARN ABOUT HPUX
set_object
set object(1m) set object(1m)NAME
set object - Changes the value of a modifiable, single-valued attribute of an object entry
SYNOPSIS
cdscp set object object-name attribute-name = attribute-value
ARGUMENTS
The full name of the object entry. The name of the attribute to be modified. Specify only one attribute at a time. See the
cds_attributes file for the list of attributes and corresponding data types that your application uses. The value of a particular
attribute. The value of an application-defined attribute is dependent on the type of attribute.
DESCRIPTION
The set object command changes the value of a modifiable, single-valued attribute of an object entry. If the attribute does not exist,
this command creates it. Usually, this task is performed through the client application. See the OSF DCE Administration Guide for more
information about attributes.
Privilege Required
You must have write permission to the object entry.
NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE.
EXAMPLE
To change the value of the sales_record attribute to region2 of an object entry named /.:/Q1_records, follow these steps: Read the
cds_attributes file to check that the attribute sales_record is listed, as shown in the following display:
OID LABEL SYNTAX 1.3.22.1.3.66 sales_record char Enter the following command to assign the value region2 to the
attribute sales_record of an object entry named /.:/Q1_records. cdscp> set object /.:/Q1_records sales_record = region2
RELATED INFORMATION
Commands: add object(1m), create object(1m), delete object(1m), list object(1m), remove object(1m), show object(1m)
Books: OSF DCE Administration Guide
set object(1m)