gpt4 book ai didi

linux - 如何在 Linux 中创建一个可以使用 ROT13 解密和加密文件的菜单?

转载 作者:太空宇宙 更新时间:2023-11-04 09:42:59 24 4
gpt4 key购买 nike

<分区>

#!/bin/bash

selection=
until [ "$selection" = "0"]; do
echo ""
echo "PROGRAM MENU"
echo "1 - Encrypt text with Rot13"
echo "2 - DEcrypt text with Rot13"
echo ""
echo "0 - Exit program"
echo ""
echo -n "Enter Selection:"
read selection
echo ""
case $selection in
1 ) echo "Line to be encrypted"
rot13 "a-z"
2 ) echo "Line to be decrypted"
rot13 "n-za-m"
3 ) exit;;
* ) echo "Please enter 1,2, or 0"
esac
done

我想读取一个 .txt 文件,加密,保存,然后解密。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com