diff --git a/etc/bin/swarm b/etc/bin/swarm index 9233e1de1fb..dd8a65a78d6 100755 --- a/etc/bin/swarm +++ b/etc/bin/swarm @@ -204,7 +204,7 @@ append_config () { if prompt "Write \"$LINE\" to \"$LOC\"?"; then if [[ "$POS" == top ]]; then # ... at the top of the file - sed -i "1i$LINE" "$LOC" + echo -e "${LINE}\n$(cat ${LOC})" > "$LOC" elif [[ "$POS" == bottom ]]; then # ... at the bottom of the file echo -e "\n$LINE" >> "$LOC"