siya,
Your description of what you are trying to do is not at all clear. Looking at the "required result" in message #4 in this thread, I'm guessing that you want to replace PH01 immediately followed by up to four zeros with string. If that is what you want, the following awk script will do that for you:
If you are using a Solaris/SunOS system, use /usr/xpg4/bin/awk or nawk instead of awk.
If the file input contains the data specified in message #1 in this thread, the output is:
which matches what you specified in message #4 in this thread.
This User Gave Thanks to Don Cragun For This Post:
I want to split a file containing millions of records.
I am issuing the command
split -l 20000 filename which will split the file in 20K records each.
It works fine except in some files, data after one particular field is lost( the field with space).
Say the record is ... (4 Replies)
HI! All
iam using Split command to split a large .txt file in to smaller files,
The syntax iam using
split -25000 Product.txt
iam getting four output files but not in .txt format but in some other format ,
when i checked the properties the Type of the output files is Type
can any... (7 Replies)
Hi,
I have to split a line of the form
1232423#asdf#124324#54534#dcfg#wert#rrftt#4567
into an array in perl. I am using
@fields;
@fields=split('#',$line);
if($fields eq "1")
But this is not working. By using the syntax, the statements in "if" are never executed. Please help.... (9 Replies)
Is there an option or a way with the split command to rename the partitioned files with a counter. For example, can the files testaa, testab, testac be renamed to test1, test2, test3 from the split command without explicilty renaming files.
Thanks,
- CB (3 Replies)
./myapp | split -b 10m -d -a 1 - "myappLog"
here split command is reading the input from the output of myapp and it will write the text in to file where in each file size is 10MB and it will create upto 10 files.
I have observed split is flushing the data for every 4096 bytes. if my... (7 Replies)
hi all,
i have problem with my script in unix ...i have script with split -d (--numeric-suffixes) in linux its working but in solaris machine the option -d isn't have
so how to i can change split -d (this output) will same in output solaris can i change with awk and how do that
thx before (2 Replies)
Hi,
There is an awk command in script and it is running successfully.
I want to split that command in 2 lines.
I have tried using '\' but its not working..
Please suggest me the solution. (11 Replies)
Hi All,
I want to split the file after size gets above 100kb.
So I am using below command.
split -b 100kb File.txt Test
But after first file, my record is breaking as in middle of the record, size of file is getting above 100kb. So after splitting half record is in one file and half... (1 Reply)
Hi All,
I have a txt file which I would like to partition into 2 separate output files. I would like to partition the odd or even groups of 4 lines from the txt file. So I would like lines 1-4 to go to file1, and lines 5-8 to go to file2, and so on until the whole txt file is divided into two... (1 Reply)
Discussion started by: landrjos
1 Replies
LEARN ABOUT HPUX
set_directory
set directory(1m) set directory(1m)NAME
set directory - Changes the value of a modifiable, single-valued attribute of a directory
SYNOPSIS
cdscp set directory directory-name attribute-name = attribute-value
ARGUMENTS
The full name of the directory. The name of a particular attribute. 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 directory command changes the value of a modifiable, single-valued attribute of a directory. 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 infor-
mation about attributes. You can specify an application-defined attribute or the following attributes: Specifies the degree of consistency
among replicas. By default, every directory inherits the convergence of its parent at creation time. The default setting on the root
directory is medium. You can define one of the following for value: CDS does not immediately propagate any updates. The next skulk dis-
tributes all updates that occurred since the previous skulk. Skulks occur at least once every 24 hours. CDS attempts to immediately propa-
gate an update to all replicas. If the attempt fails, the software lets the next scheduled skulk make the replicas consistent. Skulks occur
at least once every 12 hours. CDS attempts to immediately propagate an update to all replicas. If that attempt fails (for example, if one
of the replicas is unavailable), a skulk is scheduled for within one hour. Background skulks occur at least once every 12 hours. Use this
setting temporarily and briefly because it uses extensive system resources. Controls the upgrading of a directory from one version of CDS
to another. By modifying this attribute, you can initiate the upgrading of a directory to a higher version of CDS. Specify the value as
v.n, where v indicates the major version number and n specifies the minor version number. There is no default.
Privilege Required
You must have write permission to the directory.
NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE.
EXAMPLES
The following command sets a low convergence value on the /.:/mfg directory: cdscp> set directory /.:/mfg CDS_Convergence = low
The following commands upgrades the directory version on the /.:/host directory: dcecp> directory modify /.:/host -add {CDS_UpgradeTO 1.2}
-single
dcecp> directory synchronize /.:/host
RELATED INFORMATION
Commands: create directory(1m), delete directory(1m), list directory(1m), remove directory(1m), set directory to skulk(1m), show direc-
tory(1m)
Books: OSF DCE Administration Guide
set directory(1m)