-
You need to submit the solutions in a pdf file. For each solution mention the the command used and screenshots of the execution.
-
Submit us the pdfs on whatsapp (either number): +91 6355344038, +91 6354481596
-
Mention your full name and admission number in the pdf. Name the pdf as:
<admission number>-solution.pdf
example:u19cs001-solution.pdf
-
Deadline for submission is Monday, 7th September 2020, 12pm.
-
This competition is only for 2nd year students of SVNIT and IIIT Surat. Rest can solve but their submissions won't be counted.
-
Submitting early won't fetch you extra points. But amongst the people who have the same marks, ranks will be decided according the their submission time on the final leaderboard.
-
People with top submissions will get included in the ACM NIT Surat's github team.
-
For the vim section, the answers will be evaluated on the basis of number of keystrokes used.
-
Number in brackets after each problem statement specify the maximum points for solving that problem.
-
UPDATE: Still stuck? don't worry you can submit till today midnight (7th September 2020, 11:59pm), but with -5 points penalty.
-
UPDATE2: You can submit any number of times, the latest submission will be considered.
For all the questions, assume that your are starting from the question directory q-xx
.
-
Copy all the files from
cli/q-01/from
tocli/q-01/to
. (2) -
So,
sudo
is used to run commands in super user mode. Figure out a way to useplease
instead ofsudo
. So, if$ sudo xyz
works,$ please xyz
should works as well. (5) -
cli/q-03
has a lot of files written in UTF-8. Write all the file names which contain the string "acm". (5) -
cli/q-04/main.cpp
contains a simple hello world program. Compile it to a binary calledhello-world
. Now to run this from saycli
directory, I need to specify the whole path:$ ./q-04/hello-world
. Figure out a way to run it from any location by entering just$ hello-world
in the command line. (10) -
cli/q-05
contains some old blurry images. Add prefix ofold-
to all the image files. You cannot use therename
command. (10) -
cli/q-06/script.py
contains the script we used to generate random files for question 3. Execute this script without using thepython
command. (5) -
cli/q-07
containsfile.c
. Delete all the lines that contains the word "struct". (5) -
cli/q-08
contains a lot of c++, java and javascript files. Calculate the number of lines of code of each of the 3 languages. (10) -
cli/q-09
contains a linked list implementation written in java. Unfortunately, the code is in the reverse order. Fix it! (8)
- Given the name and number of fruits available. Your task is to sort the file so that the fruit having maximum number is first. (10)
Input file ( go to vim/fruits.txt )
oranges 5
apples 7
blueberries 15
bananas 4
ananas 6
Output file( go to vim/fruitsOutput.txt)
blueberries 15
apples 7
ananas 6
oranges 5
bananas 4
- Your task is to prepend * in front of the given lines using vim. The answer will be evaluated on the basis of keystrokes used. If less keystrokes are used, you will get better score. (10)
Input File:(go to vim/prepend.txt)
This is a
very short
file, but it is
still
full
of
surpises.
Output.txt: ( go to vim/prependOutput.txt)
*This is a
*very short
*file, but it is
*still
*full
*of
*surpises.
- Look out for figlet command. Install it on your terminal. Now using figlet, convert Input file to Output file without going out from vim. (10)
Input.txt ( go to vim/figlet.txt)
Hello World
Output.txt:( go to vim/figletOutput.txt)
_ _ _ _ __ __ _ _
| | | | ___| | | ___ \ \ / /__ _ __| | __| |
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` |
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |
|_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_|
Bonus Questions: Solve q-07
and q-09
from the cli section using just vim (5 + 5)
- Type vimtutor on your terminal and complete the basic vim tutorial.
- Missing semester vim tutorial
- Vim golf
- Vim adventures(it is free upto level 3).
- Shell Crash Course
- U19EC002 Harshit Chauhan
- U19CS012 Bhagya Rana
- Ui19co01 Abhay