Show commands without executing them

后端 未结 4 697
太阳男子
太阳男子 2020-12-08 19:55

I often interactively loop over e.g. my files and want to perform a specific operation on all of them, let\'s say I\'d like to rename all files:

for file in          


        
4条回答
  •  萌比男神i
    2020-12-08 20:03

    There is a github package called maybe, here's an example:

    $ maybe rm file
    > maybe has prevented rm file from performing 1 file system operations:
    >
    > delete /home/user/file
    >
    > Do you want to rerun rm file and permit these operations? [y/N]
    

提交回复
热议问题