11-12-2010
Filtering issues with multiple columns in a single file
Hi,
I am new to unix and would greatly appreciate some help.
I have a file containing multiple colums containing different sets of data e.g.
File 1:
John Ireland 27_December_69
Mary England 13_March_55
Mike France 02_June_80
I am currently using the awk command to filter the first 2 columns to one file and the third column to another file e.g.
File 1:
John Ireland
Mary England
Mike France
File 2:
December
March
June
I then use the "paste" command to merge the data from both files so i get the following:
File 3:
John Ireland December
Mary England march
Mike France June
Is there a way to filter all the data to a single file and not to 2 seperate files. I am thinking of using the sed command but im not too sure.
If ive made anything unclear please reply and ill try to explain it better.
Thanks in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a requirement to filter multiple entries in a text file.
Entries are a pair of 2 lines .Like
line1
line2
.......
........
Here line1, line2 consist of one pair. line1 and line2 contain different data.
There can be multiple entries for the same pair. And there can be 'n' such... (2 Replies)
Discussion started by: suman_jakkula
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I have a single column of data that I would like to cut/print (with awk or ...) into multiple columns at every empty row (or common character).
Input:
5.99123
5.94693
7.21383
5.95202
0.907935
5.99149
6.08427
0.975774
6.077
Output:
5.99123 5.95202 6.08427
5.94693... (7 Replies)
Discussion started by: agibbs
7 Replies
3. Shell Programming and Scripting
Hi -
I'm new to the awk programming language. I'm trying to print a single column of data to several columns, and I found an article on iTWorld.com (ITworld.com - Printing in columns). It looks like the mkCols2 script is very close to what I need to do, but it looks like the end of the code... (2 Replies)
Discussion started by: astroDave
2 Replies
4. Shell Programming and Scripting
Hi,
I am currently filtering a file, "BUILD_TIMES", that has multiple column of information in it. An example of the data is as follows;
Fri Nov 5 15:31:33 2010 00:28:17 R7_BCGNOFJ_70.68
Fri Nov 5 20:57:41 2010 00:07:21 R7_ADJCEL_80.6
Wed Nov 10 17:33:21 2010 00:01:13 R7_BCTTEST3_80.1X... (7 Replies)
Discussion started by: crunchie
7 Replies
5. Shell Programming and Scripting
I have this input:
10 22 1 100
11 22 10 1 50
14 3 1 100
23 3 1 100
24 15 1 100
10 22 5 3 1 33.333
11 22 1 100
It has an inconsistent number of fields but the last field is determined by 100/(NF-2) using awk.
I want to take this multiple columned input file and transform so that... (2 Replies)
Discussion started by: mdlloyd7
2 Replies
6. Shell Programming and Scripting
Hi,
Input
7488 7389 chr1.fa chr1.fa
3546 9887 chr5.fa chr9.fa
7387 7898 chrX.fa chr3.fa
7488 7389 chr21.fa chr3.fa
7488 7389 chr1.fa chr1.fa
3546 9887 chr9.fa chr5.fa
7898 7387 chrX.fa chr3.fa
Desired Output
7488 7389 chr1.fa chr1.fa 2
3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
7. Shell Programming and Scripting
Hi Guys,
I am prety new to the hell scripting world. I am running some grep/cut commands and extracting from a csv file into a list. But the final product I need is that the whole list that I now have has to be broken and separated into columns.
Say what I now have extracted is a list of... (6 Replies)
Discussion started by: h_rishi
6 Replies
8. Shell Programming and Scripting
Hi friends,
I have one file like below. (.csv type)
SNo,data1,data2
1,1,2
2,2,3
3,3,2
and another file like below.
Exclude
data1
where Exclude should be treated as column name in file2.
I want the output shown below.
SNo,data2
1,2
2,3
3,2
Where my data1 column got removed from... (2 Replies)
Discussion started by: ks_reddy
2 Replies
9. Shell Programming and Scripting
Hi friends
please help me on below,
i have 5 files like below
file1 is
x 10
y 20
z 15
file2 is
x 100
z 245
file3 is
y 78
z 23
file4 is
x 100 (3 Replies)
Discussion started by: siva kumar
3 Replies
10. Shell Programming and Scripting
Hi,
I have 3 files with one column value as shown
File: a.txt
------------
Data_a1
Data_a2
File2: b.txt
------------
Data_b1
Data_b2
Data_b3
Data_b4
File3: c.txt
------------
Data_c1
Data_c2
Data_c3
Data_c4
Data_c5 (6 Replies)
Discussion started by: vfrg
6 Replies
LEARN ABOUT DEBIAN
condor_hold
condor_hold(1) General Commands Manual condor_hold(1)
Name
condor_hold put - jobs in the queue into the hold state
Synopsis
condor_hold [-help -version]
condor_hold[-debug] [-reason reasonstring] [-subcode number] [-pool centralmanagerhostname[:portnumber]-name scheddname][-addr
"<a.b.c.d:port>"] cluster... cluster.process... user... -constraint expression...
condor_hold[-debug] [-reason reasonstring] [-subcode number] [-pool centralmanagerhostname[:portnumber]-name scheddname][-addr
"<a.b.c.d:port>"] -all
Description
condor_holdplaces jobs from the Condor job queue in the hold state. If the -nameoption is specified, the named condor_scheddis targeted for
processing. Otherwise, the local condor_scheddis targeted. The jobs to be held are identified by one or more job identifiers, as described
below. For any given job, only the owner of the job or one of the queue super users (defined by the QUEUE_SUPER_USERS macro) can place the
job on hold.
A job in the hold state remains in the job queue, but the job will not run until released with condor_release.
A currently running job that is placed in the hold state by condor_holdis sent a hard kill signal. For a standard universe job, this means
that the job is removed from the machine without allowing a checkpoint to be produced first.
Options
-help
Display usage information
-version
Display version information
-pool centralmanagerhostname[:portnumber]
Specify a pool by giving the central manager's host name and an optional port number
-name scheddname
Send the command to a machine identified by scheddname
-addr <a.b.c.d:port>
Send the command to a machine located at "<a.b.c.d:port>"
-debug
Causes debugging information to be sent to stderr , based on the value of the configuration variable TOOL_DEBUG
-reason reasonstring
Sets the job ClassAd attribute HoldReason to the value given by reasonstring. reasonstringwill be delimited by double quote marks on
the command line, if it contains space characters.
-subcode number
Sets the job ClassAd attribute HoldReasonSubCode to the integer value given by number.
cluster
Hold all jobs in the specified cluster
cluster.process
Hold the specific job in the cluster
user
Hold all jobs belonging to specified user
-constraint expression
Hold all jobs which match the job ClassAd expression constraint (within quotation marks). Note that quotation marks must be escaped with
the backslash characters for most shells.
-all
Hold all the jobs in the queue
See Also
condor_release(on page )
Examples
To place on hold all jobs (of the user that issued the condor_hold command) that are not currently running:
% condor_hold -constraint "JobStatus!=2"
Multiple options within the same command cause the union of all jobs that meet either (or both) of the options to be placed in the hold
state. Therefore, the command
% condor_hold Mary -constraint "JobStatus!=2"
places all of Mary's queued jobs into the hold state, and the constraint holds all queued jobs not currently running. It also sends a hard
kill signal to any of Mary's jobs that are currently running. Note that the jobs specified by the constraint will also be Mary's jobs, if
it is Mary that issues this example condor_holdcommand.
Exit Status
condor_holdwill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.
Author
Condor Team, University of Wisconsin-Madison
Copyright
Copyright (C) 1990-2012 Condor Team, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
Licensed under the Apache License, Version 2.0.
See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu
September 2012 condor_hold(1)