On Sat, May 26, 2001 at 09:09:49AM +0200, rjb-dis@iafrica.com wrote:
Could someone please tell me the difference between the different piping characters e.g |, >>, >
1 command < file Take input from 'file' and use it as standard input for command. 2 command << TEXT Generally used in scripts. Take input from next line onwards as standard input for command, until line "TEXT". 3 command > file Take standard output from commmand and write to file, overwriting contents. 4 command >> file Take standard output from commmand and append to file. 5 command1 | command2 Take standard output from commmand1 and use as standard input for command2. In C shell, you can use "&" with 3, 4 and 5, which lumps standard error in with standard output and "!" with 3 which overrides the setting of noclobber, or with 4 which creates the file if it doesn't exist. Bourne shell has more sophisticated handling of these things; I suggest you RTFM for this. -- David Smith Tel: +44 (0)1454 462380 (direct) STMicroelectronics Fax: +44 (0)1454 617910 1000 Aztec West TINA (ST only): (065) 2380 Almondsbury Home: 01454 616963 BRISTOL Mobile: 07932 642724 BS32 4SQ Work Email: Dave.Smith@st.com Home Email: David.Smith@ds-electronics.co.uk