Created
July 24, 2020 16:21
-
-
Save jai-dewani/bfad17e728bf90ba75ab0d6246ac1cf5 to your computer and use it in GitHub Desktop.
A bash script to create a folder with python files a template code in each one and open this folder with VScode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I found myself creating folders for each round and writing the same template again and again taking precious time in a CF contest | |
# so I create a script file that does the work for me within seconds | |
echo -n "Round Name:" | |
read round | |
mkdir $round | |
template="for _ in range(int(input())): | |
n = int(input()) | |
s = input() | |
n,m = map(int,input().split()) | |
ar = list(map(int,input().split()))" | |
touch $round/A.py | |
touch $round/B.py | |
touch $round/C.py | |
echo "${template}" > $round/A.py | |
echo "${template}" > $round/B.py | |
echo "${template}" > $round/C.py | |
code $round/. |
I think we can also ask the names of the files as an input just like the round name and use that information but since I mostly never get around the C problem, so I never even thought about questions having two parts scenario 😂
I made my own script with your idea.. thanks for that
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about unknown files like A B C D E F1 F2 ?