[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: [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)
  • Re: HTTP Request from a shell script - Pinging Google
    ... I have no idea how you got that notion, but Bash knows nothing about ... File descriptor 0 is duplicated. ... If host is a valid hostname or Internet address, ... and port is an integer port number or service ...
    (comp.unix.programmer)
  • Re: [bash] [redirection] appending using a file descriptor
    ... > I'm trying to append data to a file in bash using only an already open ... > file descriptor. ... but overwrites the file instead of just appending. ... cat FILE>&5 ...
    (comp.unix.shell)