01.12.2012 Views

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

368<br />

��<br />

��<br />

��<br />

With <strong>the</strong> command<br />

head -1 view<br />

you can display <strong>the</strong> current shebang line of <strong>the</strong> view scripts. The following<br />

Perl command changes <strong>the</strong> lines of all files in <strong>the</strong> directory.<br />

The Perl path is <strong>the</strong> entire path in Unix notation, including <strong>the</strong> name<br />

of <strong>the</strong> program, i.e. “perl.” In our example, it is c:/cygwin/bin/perl.<br />

perl -pi~ -e ↵<br />

's;#!/usr/bin/perl;#!perlpath;' *[a-z]<br />

If you now display <strong>the</strong> first line again, you should see <strong>the</strong> new path.<br />

O<strong>the</strong>rwise, delete <strong>the</strong> files and retrieve your backup from .backup to<br />

try again:<br />

rm *<br />

cp .backup/* .<br />

If <strong>the</strong> changes have been successful, you can delete <strong>the</strong> backup files<br />

and directory again:<br />

rm .backup/*<br />

rmdir .backup<br />

Changing RCS Owners<br />

To manually adapt <strong>the</strong> RCS locks in <strong>the</strong> Cygwin or bash shell, first<br />

switch to <strong>the</strong> data directory and make a backup of <strong>the</strong> files:<br />

cd /twiki/data<br />

tar czvf all.tar.gz */*<br />

Now change <strong>the</strong> entry for <strong>the</strong> owner using <strong>the</strong> following Perl command<br />

(put it all on one line):<br />

perl -pi~~~ -e 'NR

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!