Results 1 to 3 of 3
Hello People.
I have been searching for a solution to the following problem:
When my distro of choice updates Firefox web browser, the directory name is '/usr/lib/firefox-<version>'.
The problem here ...
- 02-14-2011 #1Just Joined!
- Join Date
- Feb 2011
- Location
- UK
- Posts
- 2
How Do I Copy Files to Dynamic Directories?
Hello People.
I have been searching for a solution to the following problem:
When my distro of choice updates Firefox web browser, the directory name is '/usr/lib/firefox-<version>'.
The problem here is that the directory name is dynamic by nature and doesn't allow a simple static solution, e.g.
'cp -rf /usr/local/files/bookmarks.html /usr/lib/firefox/defaults/profile'.
The same quandary applies when adding extensions, changing prefs etc.
I have looked at the following commands:-
find, sed, xargs, grep, awk, fprint.
Unfortunately my grasp of syntax and programming is very simple at best.
A nice little BASH script would be ideal.
Thanks!
- 02-15-2011 #2
I found that this
will print out the version number (try firefox --version by itself if you want to see what awk is working on). If you put that in backquotes ` `, it should give you the dynamic part of your directory specification.Code:firefox --version|awk '{print $3}'"I'm just a little old lady; don't try to dazzle me with jargon!"
- 02-16-2011 #3Just Joined!
- Join Date
- Feb 2011
- Location
- UK
- Posts
- 2
Thank you for your reply.
Now I need to incorporate '$3' response into something like:-
cp -rf /usr/local/files/bookmarks.html /usr/lib/firefox-'$3'/defaults/profile.
Any way I can do this?
Help greatly appreciated


Reply With Quote