Sponsored Content
Full Discussion: Split command
Top Forums UNIX for Dummies Questions & Answers Split command Post 302779959 by siya@ on Wednesday 13th of March 2013 02:32:56 PM
Old 03-13-2013
my required result is
Code:
string0G0240 P.he_genemodel_v1.0 CDS 120721 121773 . - . ID=PH01000000G0240.CDS;Parent=PH01000000G0240
string1G0190 P.he_genemodel_v1.0 mRA 136867 137309 . - . ID=PH01000001G0190.mRNA;Parent=PH01000001G0190
.............................................
string278028G0010 P.he_genemodel_v1.0 CDS 27 501.. . - . ID=PH01278028G0010;Description="oereed"
string278104G0010 P.he_genemodel_v1.0 CDS 34 171 . - . ID=PH01278104G0010.CDS;Parent=PH01278104G0010

So if i need this to happen,I need to replace the entries of this format
PH01 by string in first column directly
but if i do it

the entries of
PH01278028G0010 will become string 278028G0001 as per my requirement
but my entries of
PH01000000G0240 will look like string000000G0240 which i want as string0G0240
so i thought i will split from 10 bits n do selective replace only on the first column

Is my approach too run around the situation?
thanks between for your feedback!!
Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem in split command

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)
Discussion started by: superprogrammer
4 Replies

2. Shell Programming and Scripting

Split command

Can anyone tell me what this command will do? split -b$SPLITSIZE - $file1 < $file2 Will it split file1 or file2? Please explain. Malay (1 Reply)
Discussion started by: malaymaru
1 Replies

3. UNIX for Advanced & Expert Users

Split Command options

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)
Discussion started by: mohdtausifsh
7 Replies

4. UNIX for Advanced & Expert Users

Split Command in Perl

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)
Discussion started by: rochitsharma
9 Replies

5. UNIX for Dummies Questions & Answers

filenames from split command

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)
Discussion started by: ChicagoBlues
3 Replies

6. UNIX for Advanced & Expert Users

split command

./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)
Discussion started by: arv600
7 Replies

7. UNIX for Dummies Questions & Answers

change split with another command

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)
Discussion started by: zvtral
2 Replies

8. Shell Programming and Scripting

Want to split awk command

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)
Discussion started by: Sanket Dalvi
11 Replies

9. UNIX for Beginners Questions & Answers

Urgent..!!Split command

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)
Discussion started by: Amey Dixit
1 Replies

10. UNIX for Beginners Questions & Answers

Help with Split Command

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
object(1m)																object(1m)

NAME
object - A dcecp object that manages an object in CDS SYNOPSIS
object create object_name_list [-attribute attribute_list [-single]] object delete object_name_list object help [operation | -verbose] object modify object_name_list {-add attribute_list [-single] | -remove attribute_list [-types] | -change attribute_list} object operations object show object_name_list [-schema] ARGUMENTS
Examples of objects are remote procedure call (RPC) server entries, group entries, profile entries, and so on. The name of the object operation for which you want to see help information. DESCRIPTION
An object object represents an entity in CDS that has a name and attributes. An object identifies a resource such as a host system, a printer, an application, or a file. Attributes consist of a type and one or more values. Every object is the child of a CDS directory. ATTRIBUTES
Specifies the class to which an object belongs. Specifies the creation timestamp of the CDS object. The value is a read-only DTS-style timestamp, which is set by the system. Contains the version number of the object's class, which allows applications to build in compati- bility with entries created by earlier versions. Specifies the unique identifier of the object. The read-only identifier is set by the system at creation time. Specifies the timestamp of the most recent update to an attribute of the object. The value is a read-only DTS- style timestamp, which is set by the system. See the OSF DCE Administration Guide for more information about object attributes. OPERATIONS
object create Creates a new object entry in CDS. The syntax is as follows: object create object_name_list [-attribute attribute_list [-single]] Options Allows you to specify attributes by using an attribute list. See ATTRIBUTES for more information about object attributes. Specifies that attributes are single-valued. The create operation creates a new object entry in CDS. This task is usually done through a client application. The required object_name_list argument is a list of the full CDS names of the object entries to be created. Optionally, you can use the -attribute option to associate one or more attributes (see ATTRIBUTES) with each object being created. The attribute values are multi-valued unless the -single option is specified, in which case all attributes are single-valued. The -single option is valid only if the -attribute option is specified. This operation returns an empty string on success. Privileges Required You must have i (insert) permission to the parent directory. Examples The following command creates an object entry named /.:/sales/east/floor1cp: dcecp> object create /.:/sales/east/floor1cp -attribute > {{CDS_Class printer} {CDS_ClassVersion 1.0}} dcecp> object delete Removes an object entry from CDS. The syntax is as follows: object delete object_name_list The delete operation removes an object entry from CDS. The required object_name_list argument is a list of the full CDS names of the object entries to be deleted. This operation returns an empty string on success. Privileges Required You must have d (delete) permission to the object entry or A (Admin) permission to the directory that stores the object entry. Examples The following command deletes the object entry /.:/sales/east/floor1pr2: dcecp> object delete /.:/sales/east/floor1pr2 dcecp> object help Returns help information about the object object and its operations. The syntax is as follows: object help [operation | -verbose] Options Displays information about the object object. Used without an argument or option, the object help command returns brief information about each object operation. The optional operation argument is the name of an operation about which you want detailed information. Alternatively, you can use the -verbose option for more detailed information about the object object itself. Privileges Required No special privileges are needed to use the object help command. Examples dcecp> object help create Creates the named object. delete Deletes the named object. modify Adds, removes or changes an attribute in the named object. show Returns the attributes of an object. help Prints a summary of command-line options. operations Returns a list of the valid operations for this command. dcecp> object modify Adds or removes attributes or changes attribute values for object entries in CDS. The syntax is as follows: object modify object_name_list {-add attribute_list [-single] | -remove attribute_list [-types] | -change attribute_list} Options Adds one or more new attributes to an object entry. May be used with the -add option to specify that attributes to be added are single- valued. Eliminates one or more attribute values from an attribute type of an object entry. For instance, removing a value from an attribute with three values leaves the attribute with two values. The argument is an attribute list of the following form: {{attribute value}...{attribute value}} To remove an attribute type as well as all its values, use the -types option along with the -remove option. If an attribute is not present, an error is returned. Fixed CDS attribute types, such as the CDS creation timestamp (CDS_CTS), cannot be removed. May be used with the -remove option to remove the attribute type as well as its values. Invalid without the -remove option. Changes one attribute value to another for an object entry. The existing value of each attribute in attribute_list is replaced by the new value given. For multi-valued attributes, all existing values are replaced by all the values listed for the attribute in the attribute list. If an attribute or value is not present, an error is returned. The modify operation adds or removes attributes, or changes attribute values for object entries in CDS. This task is usually done through a client application. The required object_name_list argument is a list of the full CDS names of the object entries to be modified. This operation returns an empty string on success. Privileges Required You must have w (write) permission to the object entry. Examples To add the sales_record attribute with a value of region2 to the 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 the object entry named /.:/Q1_records. dcecp> object modify /.:/Q1_records -add {sales_record region2} dcecp> To remove the RPC_CLASS and RPC_CLASS_VERSION attributes: dcecp> object modify /.:/foo -remove {RPC_CLASS RPC_CLASS_VERSION} -types dcecp> object operations Returns a list of the operations supported by the object object. The syntax is as follows: object operations The list of available operations is in alphabetical order except for help and operations, which are listed last. Privileges Required No special privileges are needed to use the object operations command. Examples dcecp> object operations create delete modify show help operations dcecp> object show Returns attribute information associated with specified object entries. The syntax is as follows: object show object_name_list [-schema] Options Indicates whether an attribute is single or multi-valued. Note that the same attribute can be single-valued on one object and multi-valued on another object. The show operation displays attribute information associated with specified object entries. The required object_name_list argument is a list of the full CDS names of the object entries to be examined. If more than one object is shown, the attributes of all the objects are concatenated into one list. The order of the returned attributes is the lexical order of the object identifiers (OIDs) of each attribute for each object. The -schema option indicates whether an attribute is single-valued or multi-valued. Privileges Required You must have r (read) permission to the object entry. Examples dcecp> object show /.:/obj {RPC_ClassVersion {0200} {0300}} {RPC_Group 1234} {CDS_CTS 1994-07-01-22:06:54.990-05:00I0.000/00-00-c0-f7-de-56} {CDS_UTS 1994-07-01-22:07:37.248-05:00I0.000/00-00-c0-f7-de-56} {CDS_Class 0200} dcecp> dcecp> object show /.:/obj -schema {RPC_ClassVersion multi} {RPC_Group multi} {CDS_CTS single} {CDS_UTS single} {CDS_Class single} dcecp> RELATED INFORMATION
Commands: dcecp(1m), dcecp_clearinghouse(1m), dcecp_directory(1m), dcecp_link(1m). object(1m)
All times are GMT -4. The time now is 08:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy