From b49990801e1533736ad19eef0429b7bf5cbfb812 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Sun, 3 Jul 2022 17:19:09 +0200 Subject: Updated some scripts --- scripts/.scripts/cpp_template.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts/.scripts/cpp_template.sh') diff --git a/scripts/.scripts/cpp_template.sh b/scripts/.scripts/cpp_template.sh index 6165f51..f2ed036 100755 --- a/scripts/.scripts/cpp_template.sh +++ b/scripts/.scripts/cpp_template.sh @@ -1,8 +1,12 @@ #!/bin/sh -touch $1.cpp -echo -e "#include\n\nusing namespace std;\n\nint main () {\n}" > $1.cpp -nvim $1.cpp +echo -e "Are you sure? y)es n)o" +read input +if [ "$input" = 'y' ]; then + touch $1.cpp + echo -e "#include\n\nusing namespace std;\n\nint main () {\n}" > $1.cpp + nvim $1.cpp +fi -- cgit v1.2.3