Sponsored Content
Top Forums UNIX for Dummies Questions & Answers make 1 new file using records of 5 input files Post 302354320 by kenneth.mcbride on Thursday 17th of September 2009 07:35:42 PM
Old 09-17-2009
make 1 new file using records of 5 input files

can you make me an awk script that will:

read the 1st record from each input file, file1 file2 file3 file4 and file5 and write them to file6.

then.....

read the 2nd record from each input file, file1 file2 file3 file4 and file5 and append them to file6.

then.....

read the 3rd record from each input file, file1 file2 file3 file4 and file5 and append them to file6.

ad infinitum until all input records have been processed.

All input files have the same number of records.

Thank you in advance,
Kenny.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading specific contents from 1 input files and appending it to another input file

Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies

2. UNIX for Dummies Questions & Answers

How to split multiple records file in n files

Hello, Each record has a lenght of 7 characters I have 2 types of records 010 and 011 There is no character of end of line. For example my file is like that : 010hello 010bonjour011both 011sisters I would like to have 2 files 010.txt (2 records) hello bonjour and ... (1 Reply)
Discussion started by: jeuffeu
1 Replies

3. Shell Programming and Scripting

How to make AWK process an input file many many times?

By "many many times" I mean the times the input file is to be processed is unknown beforehand, it will be known when awk finishes processing the input file for the first time. So my question is: how to start over again from the first record of the input file when AWK finishes processing the... (7 Replies)
Discussion started by: kevintse
7 Replies

4. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

5. Shell Programming and Scripting

Compare two files with different number of records and output only the Extra records from file1

Hi Freinds , I have 2 files . File 1 |nag|HYd|1|Che |esw|Gun|2|hyd |pra|bhe|3|hyd |omu|hei|4|bnsj |uer|oeri|5|uery File 2 |nag|HYd|1|Che |esw|Gun|2|hyd |uer|oi|3|uery output : (9 Replies)
Discussion started by: i150371485
9 Replies

6. Shell Programming and Scripting

make loop from input file

Hi Guys, I have file A.txt PP97 PP66 PP87 PP66 PP47 PP57 PP44 PP20 PP66 PP16 PP13 PP51 PP68 PP70 PP75 PP30 (2 Replies)
Discussion started by: asavaliya
2 Replies

7. 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

8. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

9. UNIX for Dummies Questions & Answers

Make all records with the same number of fields (awk)

Hi, input: AA|BB|CC DD|EE FF what I am trying to get: AA|BB|CC DD|EE| FF|| I tried to create first an UDF for printing repeats, but I think I have an issue with my END section or my array: function repeat(str, n, rep, i) { for(i=1 ;i<n;i++) rep=rep str return rep } ... (6 Replies)
Discussion started by: beca123456
6 Replies

10. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
ASxxxx(1)						      General Commands Manual							 ASxxxx(1)

NAME
ASxxxx - Series of microprocessor cross assemblers for SDCC. SYNOPSIS
asx8051 [options] file1 [file2 file3 ... file6] as-gbz80 [options] file1 [file2 file3 ... file6] as-z80 [options] file1 [file2 file3 ... file6] WARNING
The information in this man page is an extract from the full documentation of SDCC, and is limited to the meaning of the options. For complete and current documentation, refer to the ASxxxx Cross Assembler Documentation, available in /usr/share/doc/sdcc-doc/aslink. DESCRIPTION
The ASxxxx assemblers are a series of microprocessor assemblers. Each assembler has a device specific section. MCS51 family is supported by asx8051. Z80family is supported by as-z80. GBZ80 (GameBoy Z80-like CPU) is supported by as-gbz80. OPTIONS
The ASxxxx assemblers are command line oriented. The PC assemblers are started with the appropriate option(s) and file(s) to assemble fol- lowing the assembler name. -d decimal listing. -q octal listing. -x hex listing (default) The listing radix affects the .lst, .rel, and .sym files. -j add line number and debug information to file. -g undefined symbols made global. -a all user symbols made global. -l create list output file1.lst. -o create object output file1.rel. -s create symbol output file1.sym. -p disable listing pagination. -w wide listing format for symbol table. -z enable case sensitivity for symbols. -f flag relocatable references by ` in the listing file. -ff flag relocatable reference by mode in the listing file. The file name for the .lst, .rel, and .sym files is the first file name specified in the command line. All output files are ascii text files which may be edited, copied, etc. The output files are the concatenation of all the input files, if files are to be assembled inde- pendently invoke the assembler for each file. The .rel file contains a radix directive so that the linker will use the proper conversion for this file. Linked files may have different radices. If the list (l) option is specified without the symbol table (s) option, the symbol table is placed at the end of the listing file. SEE ALSO
sdcc(1), aslink(1), asx8051, as-z80(1), as-gbz80(1). AUTHOR
This manual page was written by Aurelien Jarno <aurel32@debian.org>, for the Debian GNU/Linux system (but may be used by others). ASxxxx(1)
All times are GMT -4. The time now is 02:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy