Files
2026-08-28 17:49:44 +02:00

15 lines
212 B
Bash
Executable File

#!/bin/bash
set -e
LINE=$1
FILE=$2
DETECT=${3:-$LINE}
if [[ -z $(grep "$DETECT" "$FILE") ]]; then
echo "Line not found in $FILE"
echo "$LINE" >> "$FILE"
else
echo "Line already exists in $FILE"
fi