11-16-2009
Extract data based on match against one column data from a long list data
My input file:
data_5 Ali 422 2.00E-45 102/253 140/253 24
data_3 Abu 202 60.00E-45 12/23 140/23 28
data_1 Ahmad 256 7.00E-45 120/235 140/235 22
data_4 Aman 365 8.00E-45 15/65 140/65 20
data_10 Jones 869 9.00E-45 65/253 140/253 18
data_50 Pink 785
6.00E-45 12/253 140/253 16
data_6 Twins 133 4.00E-45 192/253 140/253 14
data_9 Orange 165 3.00E-45 150/253 140/253 12
data_7 King 258 1.00E-45 184/253 140/253 80
My output file:
data_50 Pink 785
6.00E-45 12/253 140/253 16
data_6 Twins 133 4.00E-45 192/253 140/253 14
data_9 Orange 165 3.00E-45 150/253 140/253 12
data_7 King 258 1.00E-45 184/253 140/253 80
I would like to extract all the content after it match the column 4 is
6.00E-45 or it other way extract the content after it find out the column 4 is
9.00E-45.
Does anybody got good suggestion about how to get this desired output result? I think awk should be able to do this?
Thanks a lot for sharing
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
We have different unix servers, let say I have server 1 and server 2.
Well whenever I ssh from server 1 to server 2, I'm ok, but when I ssh from server 2 to server 1, I can connect just fine, but I get this message:
X11 auth data does not match fake data
X11 auth data does not match fake data... (1 Reply)
Discussion started by: samytrix
1 Replies
2. Shell Programming and Scripting
Here is what old matrix look like,
IDs X1 X2 Y1 Y2
10914061 -0.364613333 -0.362922333 0.001691 -0.450094667
10855062 0.845956333 0.860396667 0.014440333 1.483899333... (7 Replies)
Discussion started by: ssshen
7 Replies
3. Shell Programming and Scripting
My input:
Data name: ABC001
Data length: 1000
Detail info
Data Direction Start_time End_time Length
1 forward 10 100 90
1 forward 15 200 185
2 reverse 50 500 450
Data name: XFG110
Data length: 100
Detail info
Data Direction Start_time End_time Length
1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies
4. Shell Programming and Scripting
Hi All,
I have two files one of which having some mobile numbers and corresponding value whose sample content as follows:
9058629605,8.0
9122828964,30.0
And in second file complete details of all mobile numbers and sample content as follows and delimeter used is comma(,):
... (8 Replies)
Discussion started by: poweroflinux
8 Replies
5. UNIX for Advanced & Expert Users
Hi,
I want to convert a 3-column data to 3-row data using shell script. Any suggestion in this regard is highly appreciated.
Thanks. (4 Replies)
Discussion started by: sktkpl
4 Replies
6. Shell Programming and Scripting
Hello experts,
Please help me in achieving this in an easier way possible. I have 2 csv files with following data:
File1
08/23/2012 12:35:47,JOB_5330
08/23/2012 12:35:47,JOB_5330
08/23/2012 12:36:09,JOB_5340
08/23/2012 12:36:14,JOB_5340
08/23/2012 12:36:22,JOB_5350
08/23/2012... (5 Replies)
Discussion started by: asnandhakumar
5 Replies
7. Shell Programming and Scripting
Hi,
I have a data file with :
01/28/2012,1,1,98995
01/28/2012,1,2,7195
01/29/2012,1,1,98995
01/29/2012,1,2,7195
01/30/2012,1,1,98896
01/30/2012,1,2,7083
01/31/2012,1,1,98896
01/31/2012,1,2,7083
02/01/2012,1,1,98896
02/01/2012,1,2,7083
02/02/2012,1,1,98899
02/02/2012,1,2,7083
I... (1 Reply)
Discussion started by: himanish
1 Replies
8. Shell Programming and Scripting
Hello,
Using the information in file 1, I would like to extract from file2 all rows which matchs in column 3.
file 1
1233
1230
1231
1232
file2
65733.00 19775.00 1220
65733.00 19793.00 1220
65733.00 19801.00 1220
65733.00 19809.00 1231
65733.00 19817.00 ... (2 Replies)
Discussion started by: jiam912
2 Replies
9. Shell Programming and Scripting
We have the data looks like below in a log file.
I want to generat files based on the string between two hash(#) symbol like below
Source:
#ext1#test1.tale2 drop
#ext1#test11.tale21 drop
#ext1#test123.tale21 drop
#ext2#test1.tale21 drop
#ext2#test12.tale21 drop
#ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
10. UNIX for Beginners Questions & Answers
Hi,
i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file
I have tried with join and awk and i keep getting blank outputs or same file
is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies
LEARN ABOUT OSX
exfat.util
EXFAT.UTIL(8) BSD System Manager's Manual EXFAT.UTIL(8)
NAME
exfat.util -- ExFAT file system utility
SYNOPSIS
exfat.util -p device removable writable
exfat.util -k device
exfat.util -s device
exfat.util -m device directory removable writable nosuid nodev
exfat.util -u device
DESCRIPTION
The exfat.util command supports the probing of ExFAT file systems, and getting or setting a volume UUID.
Options:
-p device removable writable
Probe the device to determine whether it contains an ExFAT file system. The removable and writable arguments are ignored for compat-
ibility with other file system utilities. If the device appears to contain an ExFAT file system, the exit status is 255. If the
file system contains a label (volume name), that name is written to standard output. If the device does not appear to contain an
ExFAT file system, the exit status is 254. An exit status of 252 indicates that an I/O error occurred.
-k device
Return the volume UUID of the ExFAT file system on device. If the device appears to contain an ExFAT file system, the volume's UUID
is written to standard output (as formatted by uuid_unparse(3)), and the exit status is 253. If the root directory contains a Volume
GUID entry, that GUID is the value returned; otherwise, the 32-bit volume serial number stored in the boot sector is converted to a
UUID and returned. If the device does not appear to contain an ExFAT file system, the exit status is 254. An exit status of 252
indicates that an I/O error occurred.
device may be mounted or unmounted. If it is mounted, the UUID is obtained through the file system using the getattrlist(2) call.
If the device is not mounted, exfat.util reads from the device directly.
-s device
Set a new UUID for the ExFAT file system on device, which must not be mounted. This generates a new UUID using uuid_generate(3) and
stores that UUID in a Volume GUID entry in the root directory (creating one if one does not exist, or updating an existing entry).
If the UUID is successfully set, the exit status is 253. If the device does not appear to contain an ExFAT file system, the exit
status is 254. An exit status of 252 indicates that device was already mounted, or an I/O error occurred.
-m device directory removable writable nosuid nodev
Deprecated. Mount the ExFAT file system from device onto directory. The removable argument should be either removable if the device
is removable, or fixed otherwise. The actual argument value is currently ignored. The writable argument must be either readonly or
writable which mounts the volume read-only or read/write, respectively. The nosuid argument must be either suid or nosuid. That
argument is passed as a mount option. The nodev argument must be either dev or nodev. That argument is passed as a mount option.
-u device
Deprecated. Unmount the file system on device. If the unmount is successful, the exit status is 253.
FILES
The exfat.util command is installed in the /System/Library/Filesystems/exfat.fs directory, which is typically not in a shell's search path.
COMPATIBILITY
The -m and -u options are deprecated. The preferred way to mount an ExFAT volume is to let diskarbitrationd(8) mount it automatically when
the device is discovered, or use the diskutil(8) command to explicitly mount a device. You may also use the mount(8) or mount_exfat(8) com-
mands directly. The preferred way to unmount an ExFAT volume is with the diskutil(8) command. Note that using the umount(8) command usually
will not work because various process are likely to have open files, which will prevent the unmount. The diskutil(8) command will send a
notification that causes many such processes to close their open files so that the unmount will succeed.
SEE ALSO
mount_exfat(8), fsck_exfat(8), diskarbitrationd(8,) diskutil(8), uuid(3,) uuid_unparse(3), uuid_generate(3), getattrlist(2)
HISTORY
The exfat.util utility first appeared in Mac OS X 10.6.3.
BUGS
The choice of non-zero exit status to indicate success was an unfortunate design decision.
The -u option usually does not work since several processes in Mac OS X leave files open on mounted volumes, thus preventing the unmount.
The diskutil(8) command is preferred for unmounting.
Darwin January 19, 2010 Darwin