LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell scripting (https://www.linuxquestions.org/questions/linux-newbie-8/shell-scripting-4175534827/)

Akshay Thange 02-22-2015 11:28 PM

Shell scripting
 
Please tell me for shell script..
I m writing the script.
In that script i written the 1 function and in that function i have to write the contents in existing file
so i write,
cat > /etc/puppet/manifests/init.pp
{
ensure => present,
}
.
But it caanot write the changes in ssh machine
so what i can do in my script?
Please help me...

grail 02-22-2015 11:33 PM

Please place code in [code][/code] tags.

Your question is a little confusing, would you please try and explain a little further?

One issue I can see is that you are trying to write to the /etc directory which I would normally say is only done by root.
So it may be you do not have permission to write there.

veerain 02-23-2015 01:40 AM

Please read a guide on Bash Scripting from The Linux Documentation Project.


All times are GMT -5. The time now is 12:35 PM.