|
Hi All, We seem to have inherited a bunch of java source code with hard-coded IP addresses in them and were looking for a way to convert all the IP addresses in those files to dns names. We are planning on trying the QShell utilities to achieve this and have gotten as far as listing all the "java" sources in the IFS tree from QShell and using sed to change the required line(s). The trouble seems to be with redirecting this output back to the source file. We have tried the following syntax from QShell : find /java/source/ -name '*.java' -exec sed -e 's/10.0.5.212/DatabaseServer/g' {} \; However, attempting to send the sed output back to the source files by piping it, does not seem to work; i.e. when we do : find /java/source/ -name '*.java' -exec sed -e 's/10.0.5.212/DatabaseServer/g' {} > {}.test \; a) all the output goes to one file called {}.test b) This file is unreadable from the PC The manual on the IBM website says "If the string "{}" appears anywhere in the utility name or the arguments it is replaced by the pathname of the current file". What are we doing wrong ? Any suggestions ? Our requirement is to get replace all the IP addresses with DNS names in situ. Or at least get the output to multiple "test" files which we can them move. Thanks in advance Narayanan R Pillai __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.