我正在使用bash创建备份系统。我的代码是 #!/bin/bash
if [ ! -d "BackUp" ]
then
mkdir BackUp
fi
echo "enter number of access days you want to take for back up."
read days
bak="$(find
我在运行相当大的脚本时遇到问题。在输出中说: linuxMint_post-install.sh: line 131: syntax error near unexpected token `)'
linuxMint_post-install.sh: line 131: ` "1") echo -e "\e[0;32m you have hdd, skipping to the next ste
我有一个文件数量为10个随机单词。我能够让我的Perl脚本排序文件,但我不知道为什么,因为它排序和覆盖主文件。 例如file.txt有:“a,c,d,b”我把它读入文件名然后把它排序到另一个文件名sorted.txt“a,b,c,d”但是我不想让我的file.txt原始文件进行更改。 这是调用我的壳菜单perl的排序功能: if [ "$choice" = 2 ]
then
我想从没有运气的提示输入选项中分配一个变量。如果用户输入1,我想要target_db_name =“database2”。 我的代码: while true; do
read -p "What is the table name?" table_name
table_name=${table_name,,}
if hdfs dfs -test -e /foo/$table_n
我试图做的是有盐的设置基于从for循环的$i当前值内部主机的IP。我已经尝试了以下方法,但在修改包含以下行的网络脚本时失败:192.168.200.100,它存在于所有39个节点中。 for ((i=2; i<=30; i++)); do sudo salt -L "host$i.dev.mysite.com" cmd.run "sed -i "s/192.168.200.100/192.168.