Results 1 to 2 of 2
Hey all
As stated, I am worthless at scripting, for I have no real knowledge of any common scripting langauge used in the linux world (be it bash, python, etc)
...
- 07-31-2009 #1
Worthless at scripting, need help archieving simple goal
Hey all
As stated, I am worthless at scripting, for I have no real knowledge of any common scripting langauge used in the linux world (be it bash, python, etc)
Imagine I have a directory structure full of subdirectories filled with SVG files and soft links to SVG files in this directory structure. I will be voncerting all the SVG files to PNG files, but that will obviously break the soft links to them. So what I want to do is have a script that tracks down all symlinks in the directory structure for me and changes the linked file from "link-target.svg" to "link-target.png".
How would I do this?
- 08-02-2009 #2
find -type l will find the symbolic links for you. If you directed this into a file, you could then do a construction like:
Code:for link in `cat linkfile` do rm -f $link ln -s $link.png $link done
"I'm just a little old lady; don't try to dazzle me with jargon!"


Reply With Quote