我创建了一个简单的shell脚本:bash脚本来创建另一个文件
#!/bin/bash
clear
echo "Starting Script now....."
echo "Write the info below to a new file in same directory...."
echo "name: John Smith"
echo "email: [email protected]
echo "gender: M"
echo
echo
echo "File is done"
我想创建一个与名称,电子邮件,和性别信息相同目录中的文件。 我不希望从这样的命令行做到这一点:
#./script.sh > my.config
我宁愿从文件本身内做到这一点。
很酷! +1 – 2012-01-15 01:31:08