[ -n "$item" ] || return 0
[ -e "$dstpath" ] || return 0
tmpfile=$dstpath.fileedit_rm_a_line.tmp
- grep -v -Fx "$item" "$dstpath" 2> /dev/null > $tmpfile || :
+ env LANG=C grep -v -Fx "$item" "$dstpath" 2> /dev/null > $tmpfile || :
mv "$tmpfile" "$dstpath"
}
if [ -e "$dstpath" ]
then
cp "$dstpath" "$tmpfile"
- grep -q -Fx "$item" "$dstpath" \
+ env LANG=C grep -q -Fx "$item" "$dstpath" \
|| echo "$item" >> $tmpfile
else
dstdir=`dirname "$dstpath"`
then
while read origin
do
- grep -q -Fx "$origin" "$dstpath" \
+ env LANG=C grep -q -Fx "$origin" "$dstpath" \
|| echo "$origin"
done > $tmpclip
if [ "@$advance" = @advance ]
newdiff=$4
[ -e "$oldsrc" ] || oldsrc=/dev/null
[ -e "$newsrc" ] || newsrc=/dev/null
- grep -vFx -f "$newsrc" "$oldsrc" > $olddiff 2> /dev/null || :
- grep -vFx -f "$oldsrc" "$newsrc" > $newdiff 2> /dev/null || :
+ env LANG=C grep -vFx -f "$newsrc" "$oldsrc" > $olddiff 2> /dev/null || :
+ env LANG=C grep -vFx -f "$oldsrc" "$newsrc" > $newdiff 2> /dev/null || :
[ `cat "$olddiff" "$newdiff" | wc -l` -gt 0 ]
}
newsrc=$2
[ -e "$oldsrc" ] || oldsrc=/dev/null
[ -e "$newsrc" ] || newsrc=/dev/null
- grep -vFx -f "$newsrc" "$oldsrc" 2> /dev/null
+ env LANG=C grep -vFx -f "$newsrc" "$oldsrc" 2> /dev/null
}
# ============= Manipulate new lines from an old and a new versions of a file =============
newsrc=$2
[ -e "$oldsrc" ] || oldsrc=/dev/null
[ -e "$newsrc" ] || newsrc=/dev/null
- grep -vFx -f "$oldsrc" "$newsrc" 2> /dev/null
+ env LANG=C grep -vFx -f "$oldsrc" "$newsrc" 2> /dev/null
}
# ============= Check whether removed lines exists in updating from an old and a new versions of a file =============
newsrc=$2
[ -e "$oldsrc" ] || oldsrc=/dev/null
[ -e "$newsrc" ] || newsrc=/dev/null
- grep -qvFx -f "$newsrc" "$oldsrc" 2> /dev/null
+ env LANG=C grep -qvFx -f "$newsrc" "$oldsrc" 2> /dev/null
}