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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
asxxxx
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)