Posted: 2005-03-09 10:37
Is it possible to do such a command:
Select needed files in the current directory and create symlinks for them with names the same as file names and extension - the last symbol = '0'.
I mark following files
Then I launch the magic command and in current directory I will have more two files:
which are symlinks to the first two files.
Thank you in advance.
Location: Prague, Czechia
The "magic" custom command would be:
ln -s '!' `echo '!' | sed 's/.$/0/'`
Make sure you use right quotes. There are back-quotes around the "echo '!' | sed 's/.$/0/'"
Probably there is much better/simpler way how to achive the same results, but I'm not an expert in unix shell.
Posted: 2005-03-14 10:21
Thanks, but this command don't work with long file names with spaces.
Following command works fine:
ln -s '!' "`echo '!' | sed 's/.$/0/'`"
Just for somebody who needs this.
You can post new topics in this forum
And it's free!