I am very new to jenkins and shell scripting. I am working on a task where i have to create a file and write $[Orance.home] in it.Please let me know is there any command
Asked
Active
Viewed 52 times
1 Answers
0
I may be missing something, but you could do
# replace MY_FILE.txt content with one line containing ${Orance.home}
echo "${Orance.home}" > MY_FILE.txt
or possibly,
# Append ${Orance.home} to MY_FILE.txt
echo "${Orance.home}" >> MY_FILE.txt
Or, you might use the tee command (with our without -a
)
echo "${Orance.home}" | tee MY_FILE.txt

Elliott Frisch
- 198,278
- 20
- 158
- 249
-
if i want to append text to next line in the same file hows that possible – Angel1403 Jan 17 '14 at 16:07
-
Use `>>` instead of `>`; or `tee -a`. – Elliott Frisch Jan 17 '14 at 16:08