Skip to content

Instantly share code, notes, and snippets.

@jai-dewani
Created July 24, 2020 16:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jai-dewani/bfad17e728bf90ba75ab0d6246ac1cf5 to your computer and use it in GitHub Desktop.
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
# 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/.
Copy link

ghost commented Jan 5, 2022

How about unknown files like A B C D E F1 F2 ?

@jai-dewani
Copy link
Author

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 😂

Copy link

ghost commented Apr 22, 2022

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