dmytri,
When lp prints a file normally it prints the *actual* file, so if you do something like:
lp file.txt && rm file.txt
(which translates as "if the lp command returns ok remove the file)
It's quite likely to fail as rm could easily delete the file before lp gets around to printing it.
I remember that there's an lp option (-c I think) that gets around this by taking a copy of the file and printing that; have a look on your man page 'man lp'
Regards, Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.