Share Email Facebook Twitter LinkedIn How can I export selected data to an already opened file? You can use a variation on the following: string $tmp =`file -q -sn`; file -rename "tests" ; file -es; file -rename $tmp; Parent topic: Tasks