Bunu nasıl yapabilirim?Bir yazıyı değişkenle değiştir
sed -i 's/wiki_host/$host_name/g' /root/bin/sync
Bu metin $host_name
ile wiki_host
değiştirecektir. Ama değişkenin içeriği ile değiştirmek istiyorum ..
Ben
sed -i 's/wiki_host/${host_name}/g' /root/bin/sync
ile Ya çalışır gelmez çalıştı.
bunu kontrol edin: http://theunixshell.blogspot.com/2013/04/replace-string-in-file-with-value-in.html – Vijay