#!/bin/bash #用于加密文件, 使用方法:./encrypt.sh input.txt output.txt mypassword if [ $# -ne 3 ]; then echo "Usage: $0 " exit 1 fi input_file=$1 output_file=$2 password=$3 openssl enc -aes-256-cbc -salt -in "$input_file" -out "$output_file" -k "$password"