Code: Select all
for aFile in `find /etc`; do
found=0
#echo "Entering $aFile"
for line in `grep '^.*java.*$' -i -x $aFile`; do
if [ $found -eq 0 ]; then
echo "File = $aFile"
let found=1
fi
#echo "Line = $line"
done
done
Code: Select all
File = /etc/hosts
grep: /etc/xdg/menus/applications-merged/The: No such file or directory
grep: Free: No such file or directory
grep: Network: No such file or directory
grep: Project.menu: No such file or directory
File = /etc/mime.types
grep: /etc/init.d/binfmt-support: No such file or directory
File = /etc/modprobe.d/puppy.conf
File = /etc/hiawatha/mimetype.conf
File = /etc/gitweb.conf
File = /etc/X11/xkb/symbols/pc/in
File = /etc/services
1. I couldn't figure out how to use the variables true and fase so I used one and zero instead.
2. grep seems to give an error when passed a broken symbolic link. I need a way to suppress this.
If your curious why I wrote the script. I was wondering where the java library search path might be stored. My puppy version is "precise". I recently installed libsvn-java (i.e. javaHL) which is a library required for eclipse to import from a git repository. The puppy package manager installed this at:
/usr/lib/jni
This was not in the java search path as seen by eclipse. According to:
http://subclipse.tigris.org/wiki/JavaHL
I can tell eclipse where this is by including the following line in the eclipse.ini file:
Code: Select all
-Djava.library.path=/usr/lib/jni
Code: Select all
-Djava.library.path="${workspace_loc:project}\lib;${env_var:PATH}"
http://stackoverflow.com/questions/6613 ... instead-of
Therefore, I think I should have searched instead for "LD_LIBRARY_PATH". As for making perminant environmental variable changes
In another thread they suggested editing either "/etc/profile.local" or "/etc/profile.d/". Maybe I'll think about how to do this.