![]() |
|
| *AX SOFT>>>Programming & Design |
BASH - How To (Replace specific text within a file)? |
I want to take a template file; which will later be used for an application configuration file and have certain lines within that configuration have a tag that I can later replace with any value when using a script. Example: I know bash itself might not have all the answers, however, any perl or other external applications that you know would do this - an example using that code to do the job would be greatly appreciated. Thanks #!/bin/bash Bash doesn't have sufficient text manipulation abilities built-in to achieve this; it's a shell after all. You could use bash to execute other programs which could perform these operations, such as sed, or perl. |
| Tags |
| General - Computers & Internet Software Security Programming & Design Facebook Flickr Google MSN MySpace |
| Related information |
Looping through a database by far is better. Because then if you want to expand you already have an object ready to handle it. Dynamic is the way to go. ...You need a FormMail script. You just insert your e-mail address and the name of the Order Form File that you will design to accept details of your customer's order, and you will receive an e-... Your while condition will always evaluate to true. The expression str != "done" asks whether the reference str is different from the reference "done" - that is, do these ... Put the javascript in a file and in a subfolder of your project and then reference it in the header Example: <script language="javascript" src="scripts/general.js"><... Checkout AceHtmlPro (Free Edition) which will help you learn html and allows for easy page generation. Great for anyone starting out. ...Where exactly are you storing the specification of your links? In each page? Or in a separate style sheet (CSS)? If you're not using an external style sheet, I highly recommend starting to do ... Files in Unix filesystems use inodes as structures that hold the actual file data on disks. inode number uniquely identifies a physical file on disk. Hard links are pretty much multiple names fo... It's as simple as this, in C++: string s; cin >> s; ... |
Categories--Copyright/IP Policy--Contact Webmaster |