[英]We build a jar file from these git directories, after that i want to write shell script in Jenkins which could combine these in to a single script?
[英]I want to write a single line in file using shell script linux
我有一些輸入要說“ somespacehere .file somemorespace“ sample.cpp””。 上面的代碼行我想使用Shell腳本寫入文件中。 我應該如何編寫shell腳本? 請幫我。 謝謝。
我寫一個代碼為
#!/bin/bash
filename= "./xyz.txt"
file = open(filename,'w')
echo " .file \"sample.cpp\"" > file
file .close()
這給了我錯誤
語法錯誤:“(”在最后一行意外。
從shebang開始,然后在您要文件的行中回顯? 例如,
#!/bin/bash
filename="./xyz.txt"
echo " .file \"sample.cpp\"" > $filename
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.