Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: perl file permissions

by sgifford (Prior)
on Dec 05, 2007 at 16:55 UTC ( [id://655131]=note: print w/replies, xml ) Need Help??


in reply to perl file permissions

You could also alias vi to run a script that will execute vi, then chmod the file if appropriate. Here's a start:
#!/bin/sh cmdline="" while [ $# -gt 0 ]; do case "$1" in --) break;; [+-]*) cmdline="$cmdline $1"; shift;; *) break;; esac done fn="" if [ $# -gt 0 ]; then fn=$1 fi vi $cmdline $fn ec=$? if [ -n "$fn" -a -f "$fn" ]; then case "$fn" in *.pl) chmod +x "$fn";; esac fi exit $ec

Replies are listed 'Best First'.
Re^2: perl file permissions
by Anonymous Monk on Dec 06, 2007 at 05:07 UTC
    I am very appreciative of this site and all who have responded to help.
    I've experimented with the various suggested methods and I think this one may be the best for me.
    Thank you for your assistance.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://655131]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found