Welcome to mirror list, hosted at ThFree Co, Russian Federation.

remove_message.sh « lang - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7dab14a90d1cb21ce0effa6a1b10bbb7ad3786b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# $Id$
#
# Shell script that removes a message from all message files (Lem9)
# it checks for the message, followed by a space
#
# Example:  remove_message.sh 'strMessageToRemove' 
#

if [ $# -ne 1 ] ; then
    echo "usage: remove_message.sh 'strMessageToRemove'"
    exit 1
fi
    
for file in *.inc.php
do
    echo "lines before:" `wc -l $file`
    grep -v "$1 " ${file} > ${file}.new
    rm $file
    mv ${file}.new $file
    echo " lines after:" `wc -l $file`
done
echo " "