Browse Source

echo sed

main
pvincent 7 days ago
parent
commit
98587a8d74
  1. 7
      sympa/recipe/sympa_fix_personalization.recipe

7
sympa/recipe/sympa_fix_personalization.recipe

@ -53,9 +53,10 @@ function prepend_2lines_of_text_before_existing_line {
if ! (grep "^$existing$" $file -B2 | grep -qz "$line1.*$line2.*$existing"); then
echo 'do prepend'
# >&2 echo "line1=$line1"
# >&2 echo "line2=$line2"
# >&2 echo "existing=$existing"
>&2 echo "line1=$line1"
>&2 echo "line2=$line2"
>&2 echo "existing=$existing"
echo sed -i "/^$existing$/s/^/$line1\n$line2\n/" $file
sed -i "/^$existing$/s/^/$line1\n$line2\n/" $file
else
echo 'already done!'

Loading…
Cancel
Save