LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2015, 11:28 PM   #1
Akshay Thange
LQ Newbie
 
Registered: Feb 2015
Posts: 1

Rep: Reputation: Disabled
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...
 
Old 02-22-2015, 11:33 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
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.
 
1 members found this post helpful.
Old 02-23-2015, 01:40 AM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Please read a guide on Bash Scripting from The Linux Documentation Project.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
win32,shell code,shell programming,shell scripting? mr.cracker Linux - Newbie 4 07-12-2013 11:20 PM
LXer: Terminal functions for shell scripting with Shell Curses LXer Syndicated Linux News 0 03-26-2008 11:50 PM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration