小编Pap*_*ost的帖子

这是非法的语法

我正在尝试编写一个脚本,该脚本将生成一个随机数,然后创建一个名为该随机数的目录并复制到文本文件中.我已经尝试了所有我能想到的所有分配变量,但每次我得到

RANDOM: command not found
RANDOM: command not found
bash: //small.txt: No such file or directory
bash: //small.txt: No such file or directory
Run Code Online (Sandbox Code Playgroud)

以下是我的代码

#!/bin/bash
one=$(RANDOM)
two=$(RANDOM)

mkdir -p $one
mkdir -p $two
echo “BIGGGGGONgrery54y457457yytewrterytyutytytyhtytryrtyrthrthtrhrtyhrthrhtrhrthrthrthrthE”| > $one/small.txt
echo “B”| > $two/small.txt
echo "finish -l test me "
done
Run Code Online (Sandbox Code Playgroud)

bash

1
推荐指数
1
解决办法
95
查看次数

标签 统计

bash ×1