I am trying to to take unique values from the first column using cut -d , :f1 | sort | uniq to create a list of files and using the below code to populate the output files.
Code:
for id in `cut -d , :f1 input.txt | sort | uniq` ;do
grep $id input.txt > $id.txt
done
But it is taking so long time. Cut itself taking 7mins as the input file is huge.
Please suggest any other approach which can improve the turnaround time.
Hello,
I have two files that have delimited entries as shown below. I would like to use either Perl or Shell script to extract all the rows in File 1 corresponding to values in File 2 and output it to another File.
File 1
-------
1 36 24 Object1
2 45 36 Object2
3 96 ... (1 Reply)
Hi
I have 2 files:-
1. List of files which consists of names of some output files.
2. A delimited file; delimted by "|"
I want to replace the value of the $23 (23rd column) in the delimited file with name in the first file. It is always position to position. Meaning first row of the first... (5 Replies)
I have a file in which I want to do multiple find and replace of strings. For a single replace I can implement:
sed -i 's/old/new/' <input_file>
I have a second file that contains the old and the new values like the arbitrary example below:
old new
xyz pqr
ab 756
rst pqr... (3 Replies)
Hello,
I have two files as shown below:
test1
678
679
689
690
710
test2
1 678
654 800
676 791
689 900
I want to get a count of lines from test2 whose columns bound the values in test1
I tried running the code below; however am getting wrong results. (3 Replies)
Hi,
I am looking for an awk script which should help me to meet the following requirement:
File1 has records in following format
INF: FAILEd RECORD AB1234
INF: FAILEd RECORD PQ1145
INF: FAILEd RECORD AB3215
INF: FAILEd RECORD AB6114
............................ (2 Replies)
Hi all,
I have a file (say file.txt) which contains comma-separated rows. Each row has seven columns. Only column 4 or 5 (not both) can have empty values like "" in each line.
Sample lines
So, now i want all the rows that have column 4 as "" go in file1.txt and all the rows that have column... (8 Replies)
Hi,
I have a tab delimited text file with three different columns. I want to add an extra column to the text file. The extra column will be the second column and it will equal third column - 1. How do I go about doing that? Thanks!
Input:
chr1 788822 rs11240777
chr1 1008567 rs9442372... (2 Replies)
I have 3 files, data file,schema file and a threshold file.
Data file contains data in which columns are distributed according to schema file. This data file doesn't contain any headers.
Three continuous columns in the data file represent single variable in schema file.
first column represent... (1 Reply)
input.csv:
Field1,Field2,Field3,Field4,Field4
abc ,123 ,xyz ,000 ,pqr
mno ,123 ,dfr ,111 ,bbb
output:
Field2,Field4
123 ,000
123 ,111
how to fetch the values of Field4 where Field2='123'
I don't want to fetch the values based on column position. Instead want to... (10 Replies)
I have two files which are the output of a multiple choice vocab test (60 separate questions) from 104 people (there are some missing responses) and the question list. I have the item list in one file (File1)
Item,Stimulus,Choice1,Choice2,Choice3,Choice4,Correct... (5 Replies)
Discussion started by: samonl
5 Replies
LEARN ABOUT MOJAVE
datetime::locale::ky
DateTime::Locale::ky(3) User Contributed Perl Documentation DateTime::Locale::ky(3)NAME
DateTime::Locale::ky
SYNOPSIS
use DateTime;
my $dt = DateTime->now( locale => 'ky' );
print $dt->month_name();
DESCRIPTION
This is the DateTime locale package for Kirghiz.
DATA
This locale inherits from the DateTime::Locale::root locale.
It contains the following data.
Days
Wide (format)
2
3
4
5
6
7
1
Abbreviated (format)
2
3
4
5
6
7
1
Narrow (format)
2
3
4
5
6
7
1
Wide (stand-alone)
2
3
4
5
6
7
1
Abbreviated (stand-alone)
2
3
4
5
6
7
1
Narrow (stand-alone)
2
3
4
5
6
7
1
Months
Wide (format)
1
2
3
4
5
6
7
8
9
10
11
12
Abbreviated (format)
1
2
3
4
5
6
7
8
9
10
11
12
Narrow (format)
1
2
3
4
5
6
7
8
9
10
11
12
Wide (stand-alone)
1
2
3
4
5
6
7
8
9
10
11
12
Abbreviated (stand-alone)
1
2
3
4
5
6
7
8
9
10
11
12
Narrow (stand-alone)
1
2
3
4
5
6
7
8
9
10
11
12
Quarters
Wide (format)
Q1
Q2
Q3
Q4
Abbreviated (format)
Q1
Q2
Q3
Q4
Narrow (format)
1
2
3
4
Wide (stand-alone)
Q1
Q2
Q3
Q4
Abbreviated (stand-alone)
Q1
Q2
Q3
Q4
Narrow (stand-alone)
1
2
3
4
Eras
Wide
BCE
CE
Abbreviated
BCE
CE
Narrow
BCE
CE
Date Formats
Full
2008-02-05T18:30:30 = 3, 2008 2 05
1995-12-22T09:05:02 = 6, 1995 12 22
-0010-09-15T04:44:23 = 7, -10 9 15
Long
2008-02-05T18:30:30 = 2008 2 5
1995-12-22T09:05:02 = 1995 12 22
-0010-09-15T04:44:23 = -10 9 15
Medium
2008-02-05T18:30:30 = 2008 2 5
1995-12-22T09:05:02 = 1995 12 22
-0010-09-15T04:44:23 = -10 9 15
Short
2008-02-05T18:30:30 = 08/02/05
1995-12-22T09:05:02 = 95/12/22
-0010-09-15T04:44:23 = -10/09/15
Default
2008-02-05T18:30:30 = 2008 2 5
1995-12-22T09:05:02 = 1995 12 22
-0010-09-15T04:44:23 = -10 9 15
Time Formats
Full
2008-02-05T18:30:30 = 18:30:30 UTC
1995-12-22T09:05:02 = 09:05:02 UTC
-0010-09-15T04:44:23 = 04:44:23 UTC
Long
2008-02-05T18:30:30 = 18:30:30 UTC
1995-12-22T09:05:02 = 09:05:02 UTC
-0010-09-15T04:44:23 = 04:44:23 UTC
Medium
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 09:05:02
-0010-09-15T04:44:23 = 04:44:23
Short
2008-02-05T18:30:30 = 18:30
1995-12-22T09:05:02 = 09:05
-0010-09-15T04:44:23 = 04:44
Default
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 09:05:02
-0010-09-15T04:44:23 = 04:44:23
Datetime Formats
Full
2008-02-05T18:30:30 = 3, 2008 2 05 18:30:30 UTC
1995-12-22T09:05:02 = 6, 1995 12 22 09:05:02 UTC
-0010-09-15T04:44:23 = 7, -10 9 15 04:44:23 UTC
Long
2008-02-05T18:30:30 = 2008 2 5 18:30:30 UTC
1995-12-22T09:05:02 = 1995 12 22 09:05:02 UTC
-0010-09-15T04:44:23 = -10 9 15 04:44:23 UTC
Medium
2008-02-05T18:30:30 = 2008 2 5 18:30:30
1995-12-22T09:05:02 = 1995 12 22 09:05:02
-0010-09-15T04:44:23 = -10 9 15 04:44:23
Short
2008-02-05T18:30:30 = 08/02/05 18:30
1995-12-22T09:05:02 = 95/12/22 09:05
-0010-09-15T04:44:23 = -10/09/15 04:44
Default
2008-02-05T18:30:30 = 2008 2 5 18:30:30
1995-12-22T09:05:02 = 1995 12 22 09:05:02
-0010-09-15T04:44:23 = -10 9 15 04:44:23
Available Formats
d (d)
2008-02-05T18:30:30 = 5
1995-12-22T09:05:02 = 22
-0010-09-15T04:44:23 = 15
EEEd (d EEE)
2008-02-05T18:30:30 = 5 3
1995-12-22T09:05:02 = 22 6
-0010-09-15T04:44:23 = 15 7
Hm (H:mm)
2008-02-05T18:30:30 = 18:30
1995-12-22T09:05:02 = 9:05
-0010-09-15T04:44:23 = 4:44
hm (h:mm a)
2008-02-05T18:30:30 = 6:30 PM
1995-12-22T09:05:02 = 9:05 AM
-0010-09-15T04:44:23 = 4:44 AM
Hms (H:mm:ss)
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 9:05:02
-0010-09-15T04:44:23 = 4:44:23
hms (h:mm:ss a)
2008-02-05T18:30:30 = 6:30:30 PM
1995-12-22T09:05:02 = 9:05:02 AM
-0010-09-15T04:44:23 = 4:44:23 AM
M (L)
2008-02-05T18:30:30 = 2
1995-12-22T09:05:02 = 12
-0010-09-15T04:44:23 = 9
Md (M-d)
2008-02-05T18:30:30 = 2-5
1995-12-22T09:05:02 = 12-22
-0010-09-15T04:44:23 = 9-15
MEd (E, M-d)
2008-02-05T18:30:30 = 3, 2-5
1995-12-22T09:05:02 = 6, 12-22
-0010-09-15T04:44:23 = 7, 9-15
MMM (LLL)
2008-02-05T18:30:30 = 2
1995-12-22T09:05:02 = 12
-0010-09-15T04:44:23 = 9
MMMd (MMM d)
2008-02-05T18:30:30 = 2 5
1995-12-22T09:05:02 = 12 22
-0010-09-15T04:44:23 = 9 15
MMMEd (E MMM d)
2008-02-05T18:30:30 = 3 2 5
1995-12-22T09:05:02 = 6 12 22
-0010-09-15T04:44:23 = 7 9 15
MMMMd (MMMM d)
2008-02-05T18:30:30 = 2 5
1995-12-22T09:05:02 = 12 22
-0010-09-15T04:44:23 = 9 15
MMMMEd (E MMMM d)
2008-02-05T18:30:30 = 3 2 5
1995-12-22T09:05:02 = 6 12 22
-0010-09-15T04:44:23 = 7 9 15
ms (mm:ss)
2008-02-05T18:30:30 = 30:30
1995-12-22T09:05:02 = 05:02
-0010-09-15T04:44:23 = 44:23
y (y)
2008-02-05T18:30:30 = 2008
1995-12-22T09:05:02 = 1995
-0010-09-15T04:44:23 = -10
yM (y-M)
2008-02-05T18:30:30 = 2008-2
1995-12-22T09:05:02 = 1995-12
-0010-09-15T04:44:23 = -10-9
yMEd (EEE, y-M-d)
2008-02-05T18:30:30 = 3, 2008-2-5
1995-12-22T09:05:02 = 6, 1995-12-22
-0010-09-15T04:44:23 = 7, -10-9-15
yMMM (y MMM)
2008-02-05T18:30:30 = 2008 2
1995-12-22T09:05:02 = 1995 12
-0010-09-15T04:44:23 = -10 9
yMMMEd (EEE, y MMM d)
2008-02-05T18:30:30 = 3, 2008 2 5
1995-12-22T09:05:02 = 6, 1995 12 22
-0010-09-15T04:44:23 = 7, -10 9 15
yMMMM (y MMMM)
2008-02-05T18:30:30 = 2008 2
1995-12-22T09:05:02 = 1995 12
-0010-09-15T04:44:23 = -10 9
yQ (y Q)
2008-02-05T18:30:30 = 2008 1
1995-12-22T09:05:02 = 1995 4
-0010-09-15T04:44:23 = -10 3
yQQQ (y QQQ)
2008-02-05T18:30:30 = 2008 Q1
1995-12-22T09:05:02 = 1995 Q4
-0010-09-15T04:44:23 = -10 Q3
yyQ (Q yy)
2008-02-05T18:30:30 = 1 08
1995-12-22T09:05:02 = 4 95
-0010-09-15T04:44:23 = 3 -10
Miscellaneous
Prefers 24 hour time?
Yes
Local first day of the week
2
SUPPORT
See DateTime::Locale.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's
license.
perl v5.18.2 2017-10-06 DateTime::Locale::ky(3)