[svlug] Setting a files properties

Jay Link jlink at ilbbs.com
Mon Jan 7 11:44:02 PST 2002


> How do I make a script file execute when typing "./filename"?
>
> Can I use chmod to do this or is there a better way?

You must use chmod to make it executable, and you must also include
a line stating which interpreter will be used to run the script -- this
needs to appear before the first line of code.

Examples:

#!/bin/bash

or

#!/usr/bin/perl







More information about the svlug mailing list