I'm new programming in shell and I need some help with this code...
Buildname= test
echo $Buildname > lbuild
cbuild < lbuild
echo $cbuild
So echo $cbuild must display the first line in the text file created.
can someone help me with that?
使用读取
read -r cbuild < filename
我认为您要么想要在测试中使用双引号,要么Buildname = test
在脚本中添加更多内容。:-)
我冒昧地假设我知道你需要什么,这是我的赃物:
#! /bin/bash
Buildname="test"
echo $Buildname > lbuild
cbuild=$(cat lbuild)
echo $cbuild