<<< Date Index >>>     <<< Thread Index >>>

Can one access the filename when using pipe command?



When using the pipe command to feed the contents of an attachment into
a script/program is there any way to access the filename in the
script?

I have a trivial script that allows me to save HTML messages directly
into my public_html so I can view them with a browser (I connect to
the system where mutt is remotely so firing up a browser directly,
while possible, isn't exactly quick).

I'd like to do the same with attachments but they need to be saved
with their filename intact so the browser recognises them as .PNG or
.JPG files or whatever.

I can't just use 's'ave as firstly I'd need to navigate to the
destination directory which is a hassle and secondly it saves with
0600 permissions and I need 0644 for the browser to be able to see the
file. (Well the server actually, but you know what I mean)

-- 
Chris Green (chris@xxxxxxxxxxx)

    "Never ascribe to malice that which can be explained by incompetence."