if i have 2 files file1 and file2....
file1 contains 2 columns like
b a
11 aa
12 as
13 ad
15 ag
11 ar
13 ah
15 ak

file2 contains
b c
10 ds
11 at
15 gh
15 jk
13 iu
11 fg
13 yy

can any 1 give me the program to display in this way?
a b c
aa 11 at
ar 11 fg
ad 13 iu
ah 13 yy
ag 15 gh
ak 15 jk

Answer Posted / kirtiranjan sahoo

paste file1 file2 | cut -d" " -f2,3,4 | sort -n -k2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bash eval?

552


How to print all array elements and their respective indexes?

512


Is shell script a programming language?

572


What is a beat in a script?

550


What is shell geeksforgeeks?

600






How do I run a powershell script?

580


How will you pass and access arguments to a script in linux?

593


How can we find the process name from its process id?

711


Explain about echo command?

625


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

1711


Differentiate between ‘ and ” quotes.

617


What is the use of break command?

590


State the advantages of shell scripting?

598


What is bash command used for?

589


What is $1 in shell scripting?

593