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

How do I open the shell prompt?

574


What language is bash written in?

563


What is awk in shell script?

752


What are the different communication commands available in the shell?

519


What is shell prompt?

563






What is shell and terminal?

575


Where are cowrie shells found?

578


How do you find out What is your shell?

590


Which scripting language is best for automation?

536


Given a file find the count of lines containing the word "abc".

958


Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

569


What is bash shell command?

562


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

935


What are the two files of crontab command?

656


Explain about non-login shell files?

696