Archive

Posts Tagged ‘HTML’

To delete the / after the src From HTML Files

August 5, 2010 1 comment

Deleting the / from the all html file after src=

Deleting the / from the all html files containing in one folder

sed -i ‘s/src=”\//src=”/g’ *.html

Advertisements

To delete the JavaScript Tag in HTML Files

August 4, 2010 Leave a comment

sed -i  ‘/<script type=”text\/javascript”/,/<\/script>/d’  *.html

OR

U can use following code also for same process

#!/bin/bash
# ALL HTML FILES
FILES=”*.html”
# for loop read each file
for f in $FILES
do
INF=”$f”
OUTF=”$f.out.tmp”
# replace javascript
sed ‘/<script type=”text\/javascript”/,/<\/script>/d’ $INF > $OUTF
/bin/cp $OUTF $INF
/bin/rm -f $OUTF
done

%d bloggers like this: