# ============= Remove lines exactly matching a string from multiple files =============
fileedit_rm_a_line_from_files ()
{
- local item
+ local item filepath
item=$1
[ -n "$item" ] || return 0
while read filepath
# ============= Add a line to each of multiple files if no matching one exists in the file =============
fileedit_add_a_line_to_files_if_new ()
{
- local item
+ local item filepath
item=$1
[ -n "$item" ] || return 0
while read filepath
# ============= Manipulate old and new lines from an old and a new versions of a file =============
fileedit_manipulate_old_new_lines ()
{
- local oldsrc newsrc olddiff newdiff
+ local oldsrc newsrc olddiff newdiff tmpdiff
oldsrc=$1
newsrc=$2
olddiff=$3
# ============= Manipulate old lines from an old and a new versions of a file =============
fileedit_manipulate_old_lines ()
{
- local oldsrc newsrc
+ local oldsrc newsrc tmpdiff
oldsrc=$1
newsrc=$2
tmpdiff=${TMPDIR}/fileedit_manipulate_old_lines::diff
# ============= Manipulate new lines from an old and a new versions of a file =============
fileedit_manipulate_new_lines ()
{
- local oldsrc newsrc
+ local oldsrc newsrc tmpdiff
oldsrc=$1
newsrc=$2
tmpdiff=${TMPDIR}/fileedit_manipulate_new_lines::diff
# ============= Check whether removed lines exists in updating from an old and a new versions of a file =============
fileedit_exists_old_lines ()
{
- local oldsrc newsrc
+ local oldsrc newsrc tmpdiff
oldsrc=$1
newsrc=$2
tmpdiff=${TMPDIR}/fileedit_exists_old_lines::diff