LinuxQuestions.org
Help answer threads with 0 replies.
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 03-03-2007, 02:55 AM   #1
jinsnel
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
How to write in to a file using scripts..??


Can anybody help me with writing some thing in to a file using Shell scripts or pearl scripts?
Is there any commands used for these operations?
 
Old 03-03-2007, 03:18 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You need to provide more details on what you want to do. To simply create a file you can use redirection ( > file or >> file2). The first creates a new file or zeros an existing file before writing. The send appends to the end of a file. You can also use sed or awk to edit a file based on patterns in the file. Sed and awk are often used to change a parameter in a config file.

You might want to go to the http://www.tldp.org web site.

When it comes to perl, look for the CPAN.org website for a list of mirrors. They probably have lots of documentation.
 
  


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
Can anyone write scripts good? schranky54 Linux - Newbie 11 04-19-2006 05:55 PM
Can i write Lilo scripts? em00guy Linux - Software 2 07-14-2005 03:47 PM
I have some scripts that I need to write.... Meekal Programming 2 12-05-2004 04:03 PM
Some scripts I need to write.... Meekal Linux - General 1 12-05-2004 04:01 PM
Write-protection in scripts Louis_Carole Linux From Scratch 1 09-02-2004 11:22 PM

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

All times are GMT -5. The time now is 12:30 AM.

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