Bash read/write file descriptors — seek to start of file

前端 未结 7 1823
暗喜
暗喜 2020-12-08 08:48

I tried to use the read/write file descriptor in bash so that I could delete the file that the file descriptor referred to afterward, as such:

F=$(mktemp)
ex         


        
7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 09:00

    No. bash does not have any concept of "seeking" with its redirection. It reads/writes (mostly) from beginning to end in one long stream.

提交回复
热议问题