The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-07-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,915
With bash/ksh93:


Code:
while read;do 
	case "$REPLY" in 
		Name*)printf "${REPLY#*: }:";; 
		Date*)printf "${REPLY#*:}\n";;
	esac
done< <(cat file1 file2)>file3

For ksh < ksh93 use
cat file1 file2 | while read ...

Last edited by radoulov; 02-07-2007 at 04:14 PM..