The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #8 (permalink)  
Old 10-18-2007
rakeshou rakeshou is offline
Registered User
  
 

Join Date: May 2007
Posts: 75
Smile Can someone explain me whats this code is doing?

This code is too elegant for me, please explain what it does and how?

Quote:
Originally Posted by Perderabo View Post
This depends on the shell. ksh can smash through that wall by moving the "tail -15" to a co-process. I don't know that cleartool command so I'll use "cat /etc/passwd" for my example:

Code:
#! /usr/bin/ksh
exec 4>&1
tail -5 >&4 |&
exec >&p
cat /etc/passwd
exitcode=$?
exec >&- >&4
wait
echo exitcode = $exitcode
exit 0