The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #12 (permalink)  
Old 06-05-2009
Nejc Nejc is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 5
It seems Im getting somethig wrong here, since I am not very keen with Shell scripting. Here is the code which I put togheter with this forum topic:


Code:
find . -type f | while read i
do
  sed "s:<?php echo '<script language='JavaScript'>function e590206b977().*<\\\/script>'; ?>::" file > temp
  if cmp temp "$y" >/dev/null
  then
    rm temp
  else
    mv temp "$y"
  fi
done

Am I doing something wrong here? I added the "function string" above, since its a Joomla site, and it might already include such a string. The program does something, but all I does it display this error numerous times:


Code:
mv: target is not directory: No such file or directory
sed: file can't be read: No such file or directory
cmp: : No such file or directory

Thanks again.