Hi,
May I know, if a pipe separated File is large, what is the best method to calculate the unique row count of 3rd column and get a list of unique value of the 3rdcolum?
Thanks in advance! (20 Replies)
Hi all,
I've searched the forum and I can find some code to sort uniquely in perl but not by a single field.
I have a file with data such as the following:
1,test,34
1,test2,65
2,test,35,
1,test3,34
2,test,34
What i want to do is sort it uniqely by the first field only so I'd end... (2 Replies)
Hi all,
I am writing a script where i can parse through the directory and get common string in two directories i get. The command below SUN_PLATFORM=`$FIND $STREAM_PATH . -depth -name ShareableEntities | $AWK -F"/" '{if($10 ~ /sun5/) print $0}'` gives the following output:-
... (1 Reply)
Input file
---------
12:name1:|host1|host1|host2|host1
13:name2:|host1|host1|host2|host3
14:name3:
......
Required output
---------------
12:name1:host1(2)|host1(1)
13:name2:host1(2)|host2(1)|host3(1)
14:name3:
where (x) - Count how many times field appears in last column
... (3 Replies)
I have a file with contents below
123,502
123,506
123,702
234,101
235,104
456,104
456,100
i want to sort such that i get a unique value in column A, and for those with multiple value in A, i want the lowest value in B.
output should be
123,502
234,101
235,104
456,100 (3 Replies)
I have another file with three columns A,B,C as below
123,1,502
123,2,506
123,3,702
234,4,101
235,5,104
456,6,104
456,7,100
i want to sort such that i get a unique value in column A, and for those with multiple value in A, i want the lowest value in C.
output should be
Code:... (3 Replies)
Hi,
I am modifying a file with sed command. i want to make SCORE= blank in the file whereever SCORE=somevalue.
What will *$ do in the below command?
cat $file | sed 's/SCORE=.*$/SCORE=\r/g' > newfile
The last line is also missing in the new file. How to make SCORE='100' to SCORE=... (5 Replies)
Hi, this is about sorting a very large file (like 10 gb) to keep lines with unique entries across SOME of the columns.
The line originally looked like this:
sort -u -k2,2 -k3,3n -k4,4n -k5,5n -k6,6n file_unsorted > file_sorted
please note the -u flag.
The problem is that this single... (4 Replies)
I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks. (7 Replies)
Hi,
I have an input file that I have sorted in a previous stage by $1 and $4. I now need something that will take the first record from each group of data based on the key being $1
Input file
1000AAA|"ZZZ"|"Date"|"1"|"Y"|"ABC"|""|AA
1000AAA|"ZZZ"|"Date"|"2"|"Y"|"ABC"|""|AA... (2 Replies)
Discussion started by: Ads89
2 Replies
LEARN ABOUT HPUX
lvremove
lvremove(1M)lvremove(1M)NAME
lvremove - remove one or more logical volumes from LVM volume group
SYNOPSIS
autobackup] lv_path ...
Remarks
If the logical volume input arguments belong to a combination of volume groups version 1.0 and 2.0 or higher, the arguments may not be pro-
cessed in the order they are listed on the command line.
DESCRIPTION
The command removes each logical volume specified by lv_path ....
Logical volumes must be closed before they can be removed. For example, if the logical volume contains a file system, the file system
before removing it.
Options and Arguments
recognizes the following options and arguments:
lv_path The block device path name of a logical volume.
Set automatic backup for this invocation of this command.
autobackup can have one of the following values:
Automatically back up configuration changes made to the logical volume.
This is the default.
After this command executes, the command (see vgcfgbackup(1M)) is executed for the volume group to which
the logical volume belongs.
Do not back up configuration changes this time.
Specify that no user confirmation is required.
Shared Volume Group Considerations
For volume group version 1.0 and 2.0, cannot be used if the volume group is activated in shared mode. For volume groups version 2.1 (or
higher), can be performed when activated in either shared, exclusive, or standalone mode.
Note that the daemon must be running on all the nodes sharing a volume group activated in shared mode. See lvmpud(1M).
When is issued, it removes the logical volume device special files from all the nodes sharing the volume group.
When a node wants to share the volume group, the user must first execute a if logical volumes were removed at the time the volume group was
not activated on that node.
LVM shared mode is currently only available in Serviceguard clusters.
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed.
If is not specified or is null, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)).
EXAMPLES
Remove a logical volume without requiring user confirmation:
WARNINGS
This command destroys all data in the specified logical volumes.
SEE ALSO lvchange(1M), lvmpud(1M), umount(1M).
lvremove(1M)