use bashrc for start
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -v
|
||||
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
|
||||
Reference in New Issue
Block a user