digital adj. Having digits.     peer n. A comrade; a companion; a fellow; an associate. inmotion    
   
Recent Articles
Stop DNSMasq From Forwarding Local Hostnames
Saturday, September 25, 2010
Securing your Wireless LAN
Wednesday, August 18, 2010
Some tips and things you might not know about your wireless network.
Using Different Subversion Client Versions
Wednesday, August 18, 2010
Handling a Subversion Repository URL Change
Sunday, May 3, 2009
If your repository URL changes, you can use the following command to fix existing snapshots.
vfat Mounts Default to Lowercase Shortnames
Tuesday, April 21, 2009
I want a "this is brain-damage" quote from Linus for this mess.
VirtualBox or VMWare Virtual Machine at Login
Sunday, April 12, 2009
How to start a virtual machine in X when a user logs in.
Dialog Progress Bar Through Pipe
Sunday, April 12, 2009
How to use dialog to display a script progress bar and communicate progress to it through a named pipe.
Mount JFFS2 Image
Saturday, October 25, 2008
Example of how to mount a JFFS2 image using mtdblock.

There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
- Charles Hoare

Projects-Misc Scripts-Insert Code...

Insert Code File Header

Sunday, March 6, 2005 by digitalpeer

A simple BASH script that dynamically inserts headers such at copyright information and disclaimers in source files.

1) Inserts a header file into all files with the given extension.
2) Does so recursively.
3) Won't insert it if the header already exists.
4) Variables in the format %VARIABLE% are replaced in the header.
4-1) Replaces predefined variables in the header:
FILENAME (just file name)
FILEPATH (full file path)
TIME (06:11:43 PM)
DATE (2005-03-04)
4-2) Replaces user defined variables in the header. This includes
anything defined on the command line as an option in the
format --VARIABLE=VALUE and evaluates %VARIABLE% to VALUE in the
header.
Attached Files
header.sh, uploaded Sunday, March 6, 2005
Version 1.0


Submit Comment to This Article - Be the first!
Please post a comment if you have something to add, find something wrong, or would like more information on the topic at hand. Do not use the comment form to contact the author about unrelated concerns!

Name: Email (optional):
Enter verification number here: