appending file using “paste” command hack

$cat a.txt 
hello
$cat b.txt 
killo
$ls
1  a.txt  b.txt  l.txt  trueangle  u.txt
$cat u.txt 
UPPERCASE
$cat l.txt 
uppercase
$cat a.txt >> b.txt >> l.txt >> u.txt 
$cat u.txt 
UPPERCASE
hello
$cat a.txt 
hello
$cat 
1          a.txt      b.txt      l.txt      trueangle/ u.txt      
$cat l.txt 
uppercase
$cat a.txt 
hello
$cat a.txt >> b.txt 
$cat b.txt 
killo
hello
$cat l.txt >> u.txt 
$cat u.txt 
UPPERCASE
hello
uppercase
$paste b.txt u.txt > final.txt
$cat final.txt 
killo	UPPERCASE
hello	hello
	uppercase
$sort -t: -k1 final.txt 
hello	hello
killo	UPPERCASE
	uppercase
$

Leave a comment

Your email address will not be published. Required fields are marked *