歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> 在vim中實現批量加密

在vim中實現批量加密

日期:2017/2/27 9:38:35   编辑:更多Linux

如何實現通過VIM批量對文件加密?  ============================================================  #!/bin/bash  # Encrypt file with vim    if (test $# -lt 2) then   echo Usage: decrypt passWord filename  else   vim -e -s -c ":set key=$1" -c ':wq' $2   echo "$2 encrypted."  fi  ============================================================  [weeder@SMTH weeder]$ for file in *.txt ; do encrypt test $file ; done  test2.txt encrypted.  test4.txt encrypted.  test9.txt encrypted.  kick.txt encrypted.   echo "$2 encrypted."  fi  [weeder@SMTH weeder]$ for file in *.txt ; do encrypt test $file ; done  test2.txt encrypted.  test4.txt encrypted.  test9.txt encrypted.  kick.txt encrypted.  too_old.txt encrypted.  too_old_again.txt encrypted.  bg5.txt encrypted.  [weeder@SMTH weeder]$   




Copyright © Linux教程網 All Rights Reserved