I want to create symlinks to multiple files:
ln -s dev-*.php 's/dev-(.*\.php)/$1/'
Results hoped for:
site.php links to dev-site.php
file.php links to dev-file.php
What's the most concise way to achieve this?
bashshellsymlinkwildcards
I want to create symlinks to multiple files:
ln -s dev-*.php 's/dev-(.*\.php)/$1/'
Results hoped for:
site.php links to dev-site.php
file.php links to dev-file.php
What's the most concise way to achieve this?
Best Answer
Well, if it's all in the same directory you could do something like this in bash or any other Bourne-style/POSIX shell:
which would create symlinks without "dev-" to files beginning with "dev-".