[bash] [redirection] appending using a file descriptor

From: claudibus (sick_soul_at_yahoo.it)
Date: 09/27/03


Date: 27 Sep 2003 02:26:00 -0700

Hello all,

I'm trying to append data to a file in bash using only an already open
file descriptor.

example (supposing file descriptor 5 is already open)

cat FILE >&5

works ok, but overwrites the file instead of just appending. So I
guessed

cat FILE >>&5

but I got
bash: syntax error near unexpected token `&5'

I've not found the answer in the info pages,
so I'm hoping for your greatly appreciated help.

Claudio



Relevant Pages

  • [bash] [redirection] appending using a file descriptor
    ... I'm trying to append data to a file in bash using only an already open ... example (supposing file descriptor 5 is already open) ... cat FILE>>&5 ...
    (comp.unix.shell)
  • Re: grub configuration, boot.
    ... File descriptor 3 leaked on vgscan invocation. ... Parent PID ... 16857: bash ...
    (Fedora)
  • leaked on lvscan invocation
    ... File descriptor 4 leaked on lvscan invocation. ... Parent PID ... 10610: bash ...
    (uk.comp.os.linux)
  • Re: [SLE] bash read from named pipe, may be OT
    ... >> So the separate man page readhas dissapeared, it refers the ... BASH also has many operational options, ... Bash, same as he does. ... It's an interesting trick he did: it seems he asociates a file descriptor ...
    (SuSE)
  • Re: Bash process substitution error
    ... cat: write error: Bad file descriptor ... Am I wrong in syntax, semantics or is there a problem with bash, ... Cygwin or combination of these I am not aware of? ...
    (comp.unix.shell)