Quote:
Originally Posted by Raakh
I want to remove ../servlet and /servlet from about 700 java file. how can i do that
|
Did you mean to say "from about 700 java files?"
Are all the files in the same directory or in subdirectories?
If they are scattered in subdirectories, use the "find" command to locate the files.
Are the "../servlet" and "/servlet" on a line by themselves?
if so
sed -i '/\.\.\/servlet/d;/\/servlet/d' javafile
will delete them.
Code:
find ./ -type f -name "*.java" -exec sed -i '/\.\.\/servlet/d;\/servlet/d' '{}' \;