LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to write in to a file using scripts..?? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-write-in-to-a-file-using-scripts-534128/)

jinsnel 03-03-2007 02:55 AM

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?

jschiwal 03-03-2007 03:18 AM

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.


All times are GMT -5. The time now is 02:09 AM.