Sponsored Content
Top Forums Shell Programming and Scripting read input from 2 files and print them in alternate columns Post 302171050 by sriram.s on Wednesday 27th of February 2008 12:35:02 PM
Old 02-27-2008
MySQL read input from 2 files and print them in alternate columns

Hi Frnz

Please help me out.
I have two text files.

A.txt

one
two
three
four

B.txt

Jan
Feb
Mar
Apr

I need the output as

one Jan
Two Feb
Three Mar
Four Apr

How to write a script to get the output like this.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

compare columns from seven files and print the output

Hi guys, I need some help to come out with a solution . I have seven such files but I am showing only three for convenience. filea a5 20 a8 16 fileb a3 42 a7 14 filec a5 23 a3 07 The output file shoud contain the data in table form showing first field of... (7 Replies)
Discussion started by: smriti_shridhar
7 Replies

2. Shell Programming and Scripting

awk read input files

hi, i'm a beginner in writing awk scripts and I have a problem with reading input files. Requirement for my programm: compare file1 to file2 and check if value in column1 is equal and value in column5 is different. File 1: 180 P 01.01.2008 30.06.2008 2 180 P 01.07.2008 ... (10 Replies)
Discussion started by: tgooper
10 Replies

3. Shell Programming and Scripting

Compare columns 2 files and print

File 1 has 16 columns so does File 2 I want to remove all records from File 2 that column 1 and column 16 match between file 1 and file 2 delimter of files is ~ (10 Replies)
Discussion started by: sigh2010
10 Replies

4. Shell Programming and Scripting

Print output and read input on same line

How do I print output and read input on the same line in ksh? echo Hello, what is your name? read name (1 Reply)
Discussion started by: robin_simple
1 Replies

5. Shell Programming and Scripting

awk : Want to print columns of different input files in line wise

Hi, I want to print last column of 3 input files with awk. cat file1.txt file2.txt file3.txt file1.txt 1 ad 200 2 ss 300 file2.txt 1 mm 444 2 ee 555 file3.txt 1 kk 999 2 jj 555 My o/p should be :- 1 200 444 999 2 300 555 555 (3 Replies)
Discussion started by: satishmallidi
3 Replies

6. Shell Programming and Scripting

Read input files and merge them in given order and write them to input one param or one file

Dear Friends, I am looking for a shell script to merge input files into one file .. here is my idea: 1st paramter would be outfile file (all input files content) read all input files and merge them to input param 1 ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies

7. Programming

Read columns from text files

Dear All, I have basic structure of the C++ code . It suppose to read particular columns from some txt file. The txt file look like following (snippet). I have to ask the details for instance 'id' information for rows satisfying text with red color. The issue is that the txt file has not just the... (2 Replies)
Discussion started by: emily
2 Replies

8. Shell Programming and Scripting

Printing every alternate columns in a text file

Hi, I have a big matrix with 1 million columns and 21 rows, which is a tab delimited file. I would like to print every alternate columns into a new file. For each row, the start column will be always the first column. For example the input file 1 2 4 5 8 0 7 9 2 5 6 3 0 6 9 2 3 6 3 6 6 0... (3 Replies)
Discussion started by: Kanja
3 Replies

9. Shell Programming and Scripting

Use while loop to read file and use ${file} for both filename input into awk and as string to print

I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix. I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice. Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

10. UNIX for Beginners Questions & Answers

How to use "awk" to print columns from different files in separate columns?

Hi, I'm trying to copy and paste the sixth column from a bunch of files into a single file having each column pasted in separate columns (and not one after each other in just one column.) I tried this code but works only partially because it copied and pasted 50 rows of each column... (6 Replies)
Discussion started by: Frastra
6 Replies
DateTime::Locale::af(3) 				User Contributed Perl Documentation				   DateTime::Locale::af(3)

NAME
DateTime::Locale::af SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'af' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Afrikaans. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) Maandag Dinsdag Woensdag Donderdag Vrydag Saterdag Sondag Abbreviated (format) Ma Di Wo Do Vr Sa So Narrow (format) 2 3 4 5 6 7 1 Wide (stand-alone) Maandag Dinsdag Woensdag Donderdag Vrydag Saterdag Sondag Abbreviated (stand-alone) Ma Di Wo Do Vr Sa So Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) Januarie Februarie Maart April Mei Junie Julie Augustus September Oktober November Desember Abbreviated (format) Jan Feb Mar Apr Mei Jun Jul Aug Sep Okt Nov Des Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) Januarie Februarie Maart April Mei Junie Julie Augustus September Oktober November Desember Abbreviated (stand-alone) Jan Feb Mar Apr Mei Jun Jul Aug Sep Okt Nov Des Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) 1ste kwartaal 2de kwartaal 3de kwartaal 4de kwartaal Abbreviated (format) K1 K2 K3 K4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1ste kwartaal 2de kwartaal 3de kwartaal 4de kwartaal Abbreviated (stand-alone) K1 K2 K3 K4 Narrow (stand-alone) 1 2 3 4 Eras Wide voor Christus na Christus Abbreviated v.C. n.C. Narrow v.C. n.C. Date Formats Full 2008-02-05T18:30:30 = Dinsdag 05 Februarie 2008 1995-12-22T09:05:02 = Vrydag 22 Desember 1995 -0010-09-15T04:44:23 = Saterdag 15 September -10 Long 2008-02-05T18:30:30 = 05 Februarie 2008 1995-12-22T09:05:02 = 22 Desember 1995 -0010-09-15T04:44:23 = 15 September -10 Medium 2008-02-05T18:30:30 = 05 Feb 2008 1995-12-22T09:05:02 = 22 Des 1995 -0010-09-15T04:44:23 = 15 Sep -10 Short 2008-02-05T18:30:30 = 2008/02/05 1995-12-22T09:05:02 = 1995/12/22 -0010-09-15T04:44:23 = -010/09/15 Default 2008-02-05T18:30:30 = 05 Feb 2008 1995-12-22T09:05:02 = 22 Des 1995 -0010-09-15T04:44:23 = 15 Sep -10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 nm. UTC 1995-12-22T09:05:02 = 9:05:02 vm. UTC -0010-09-15T04:44:23 = 4:44:23 vm. UTC Long 2008-02-05T18:30:30 = 6:30:30 nm. UTC 1995-12-22T09:05:02 = 9:05:02 vm. UTC -0010-09-15T04:44:23 = 4:44:23 vm. UTC Medium 2008-02-05T18:30:30 = 6:30:30 nm. 1995-12-22T09:05:02 = 9:05:02 vm. -0010-09-15T04:44:23 = 4:44:23 vm. Short 2008-02-05T18:30:30 = 6:30 nm. 1995-12-22T09:05:02 = 9:05 vm. -0010-09-15T04:44:23 = 4:44 vm. Default 2008-02-05T18:30:30 = 6:30:30 nm. 1995-12-22T09:05:02 = 9:05:02 vm. -0010-09-15T04:44:23 = 4:44:23 vm. Datetime Formats Full 2008-02-05T18:30:30 = Dinsdag 05 Februarie 2008 6:30:30 nm. UTC 1995-12-22T09:05:02 = Vrydag 22 Desember 1995 9:05:02 vm. UTC -0010-09-15T04:44:23 = Saterdag 15 September -10 4:44:23 vm. UTC Long 2008-02-05T18:30:30 = 05 Februarie 2008 6:30:30 nm. UTC 1995-12-22T09:05:02 = 22 Desember 1995 9:05:02 vm. UTC -0010-09-15T04:44:23 = 15 September -10 4:44:23 vm. UTC Medium 2008-02-05T18:30:30 = 05 Feb 2008 6:30:30 nm. 1995-12-22T09:05:02 = 22 Des 1995 9:05:02 vm. -0010-09-15T04:44:23 = 15 Sep -10 4:44:23 vm. Short 2008-02-05T18:30:30 = 2008/02/05 6:30 nm. 1995-12-22T09:05:02 = 1995/12/22 9:05 vm. -0010-09-15T04:44:23 = -010/09/15 4:44 vm. Default 2008-02-05T18:30:30 = 05 Feb 2008 6:30:30 nm. 1995-12-22T09:05:02 = 22 Des 1995 9:05:02 vm. -0010-09-15T04:44:23 = 15 Sep -10 4:44:23 vm. 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 Di 1995-12-22T09:05:02 = 22 Vr -0010-09-15T04:44:23 = 15 Sa 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 nm. 1995-12-22T09:05:02 = 9:05 vm. -0010-09-15T04:44:23 = 4:44 vm. 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 nm. 1995-12-22T09:05:02 = 9:05:02 vm. -0010-09-15T04:44:23 = 4:44:23 vm. 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 = Di, 2-5 1995-12-22T09:05:02 = Vr, 12-22 -0010-09-15T04:44:23 = Sa, 9-15 MMdd (MM/dd) 2008-02-05T18:30:30 = 02/05 1995-12-22T09:05:02 = 12/22 -0010-09-15T04:44:23 = 09/15 MMM (LLL) 2008-02-05T18:30:30 = Feb 1995-12-22T09:05:02 = Des -0010-09-15T04:44:23 = Sep MMMd (MMM d) 2008-02-05T18:30:30 = Feb 5 1995-12-22T09:05:02 = Des 22 -0010-09-15T04:44:23 = Sep 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Di Feb 5 1995-12-22T09:05:02 = Vr Des 22 -0010-09-15T04:44:23 = Sa Sep 15 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 Februarie 1995-12-22T09:05:02 = 22 Desember -0010-09-15T04:44:23 = 15 September MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 Februarie 1995-12-22T09:05:02 = 22 Desember -0010-09-15T04:44:23 = 15 September MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Di Februarie 5 1995-12-22T09:05:02 = Vr Desember 22 -0010-09-15T04:44:23 = Sa September 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 = Di, 2008-2-5 1995-12-22T09:05:02 = Vr, 1995-12-22 -0010-09-15T04:44:23 = Sa, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Feb 1995-12-22T09:05:02 = 1995 Des -0010-09-15T04:44:23 = -10 Sep yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Di, 2008 Feb 5 1995-12-22T09:05:02 = Vr, 1995 Des 22 -0010-09-15T04:44:23 = Sa, -10 Sep 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Februarie 1995-12-22T09:05:02 = 1995 Desember -0010-09-15T04:44:23 = -10 September 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 K1 1995-12-22T09:05:02 = 1995 K4 -0010-09-15T04:44:23 = -10 K3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMM (yyyy/MM) 2008-02-05T18:30:30 = 2008/02 1995-12-22T09:05:02 = 1995/12 -0010-09-15T04:44:23 = -010/09 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = Februarie 2008 1995-12-22T09:05:02 = Desember 1995 -0010-09-15T04:44:23 = September -10 Miscellaneous Prefers 24 hour time? No Local first day of the week Maandag 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.16.2 2013-08-25 DateTime::Locale::af(3)
All times are GMT -4. The time now is 11:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy