09-26-2019
Quote:
Originally Posted by
gull04
Hi,
Your requirements seem to be changing with every post that you make, can you show us some of your data.
You originally wanted to print two files with the contents side by side, now you want to print the first file in it's entireity with the first line of the second file appended to the end of each line - is this correct?
Gull04
No I been wanted to print the first file entirely and then print the second file side by side making new lines as comes down the first file. I made a few examples.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
If I download a file via SFTP how can I tell when the process is completed? Is there a process that I can monitor?
Thanks (3 Replies)
Discussion started by: goodmis
3 Replies
2. Shell Programming and Scripting
Need shell script to read two file at same time and print output in single file
Example I have two files 1) file1.txt 2) file2.txt
File1.txt contains
Aaa
Bbb
Ccc
Ddd
Eee
Fff
File2.txt contains
Zzz
Yyy
Xxx (10 Replies)
Discussion started by: sreedhargouda
10 Replies
3. Shell Programming and Scripting
So basically what I want to do is pull out DNA sequences for a particular gene name.
I have 2 files (FILE1 and FILE2) and I want an output into a separate file (FILE3).
FILE1 and 2 are MASSIVE so I am only posting examples from each file.
So FILE1 looks like this (tab deliminted, 4... (3 Replies)
Discussion started by: kylle345
3 Replies
4. Shell Programming and Scripting
Hi all,
I have a script that is monitoring a hot folder. This script works fine with one exception when the script is executed while a file is being copied to the hot folder.
What is the easiest method to check if the copy file is completed? I'd like to get the solution in bash :) (8 Replies)
Discussion started by: gigagigosu
8 Replies
5. Shell Programming and Scripting
i have 3 files as below:
i want to print 1st,2nd,5th and 10th filed of 1st to 5th lines from each files into a line of an output file, so the result would be:
:
{line1}(field 1 of line 1 from file 1)(field 2 of line 1 from file 1)(field 5 of line 1 from file 1)(field 10 of line 1 from file... (1 Reply)
Discussion started by: saeed.soltani
1 Replies
6. Shell Programming and Scripting
I am connecting to a device using telnet, I want my script to perform certain commands : ie- show device , show inventory..etc and write the output it sees from the terminal to a file.
this is what I have got :
#!/usr/bin/expect --
set running 1
spawn telnet <ip address>
expect ... (1 Reply)
Discussion started by: samantha123
1 Replies
7. Shell Programming and Scripting
this is the requirement
list.txt
table1
table2
table3
testfile.txt
name#place#data#select * from table1
name2#place2#data2#select * from table 10 innerjoin table3
name2#place2#data2#select * from table 10
output
name place table1
name2 place table3
i tried using awk (7 Replies)
Discussion started by: vamsekumar
7 Replies
8. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
9. UNIX for Dummies Questions & Answers
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
Discussion started by: sravanreddy
4 Replies
10. Shell Programming and Scripting
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
LAM(1) BSD General Commands Manual LAM(1)
NAME
lam -- laminate files
SYNOPSIS
lam [-f min.max] [-s sepstring] [-t c] file ...
lam [-p min.max] [-s sepstring] [-t c] file ...
DESCRIPTION
The lam utility copies the named files side by side onto the standard output. The n-th input lines from the input files are considered frag-
ments of the single long n-th output line into which they are assembled. The name `-' means the standard input, and may be repeated.
Normally, each option affects only the file after it. If the option letter is capitalized it affects all subsequent files until it appears
again uncapitalized. The options are described below:
-f min.max
Print line fragments according to the format string min.max, where min is the minimum field width and max the maximum field width.
If min begins with a zero, zeros will be added to make up the field width, and if it begins with a `-', the fragment will be left-
adjusted within the field.
-p min.max
Like -f, but pad this file's field when end-of-file is reached and other files are still active.
-s sepstring
Print sepstring before printing line fragments from the next file. This option may appear after the last file.
-t c The input line terminator is c instead of a newline. The newline normally appended to each output line is omitted.
To print files simultaneously for easy viewing use pr(1).
EXAMPLES
The command
lam file1 file2 file3 file4
joins 4 files together along each line. To merge the lines from four different files use
lam file1 -S "
" file2 file3 file4
Every 2 lines of a file may be joined on one line with
lam - - < file
and a form letter with substitutions keyed by `@' can be done with
lam -t @ letter changes
SEE ALSO
join(1), paste(1), pr(1), printf(3)
STANDARDS
Some of the functionality of lam is standardized as the paste(1) utility by IEEE Std 1003.2 (``POSIX.2'').
HISTORY
The lam utility first appeared in 4.2BSD.
BUGS
The lam utility does not recognize multibyte characters.
BSD
August 12, 2004 BSD