Hey, does anybody know is there a way to remove a file while read?

Something like: rm file.txt -o - | cat - ?

  • space_cowboy@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    why not just read the file, then remove it:

    cat file.txt && rm file.txt
    

    Not that I understand why you would want to do this anyway; it kind of doesn’t make any sense.