introduction

Exercises from 42 São Paulo Basecamp (online Piscine)

Introduction to Shell commands

shel00

Exercise Description
ex00 A file called z that returns "Z", followed by a new line, whenever the command cat is used on it
ex01 Create a file testShell00 with the following permissions: -r--r-xr-x
ex02 Create a list of files and alterate it's permissions
ex03 Once you’ve got at least one Kerberos ticket, write a list of all your tickets into a file named klist.txt
ex04 In a midLS file, place the command line that will list all files and directories in your current directory, separated by a comma, by order of creation date. Make sure directories’ names are followed by a slash character.
ex05 A shell script that displays the ids of the last 5 commits of your git repository
ex06 A short shell script that lists all the existing files ignored by your GiT repository
ex07 Create a file b to store the diff between a and b
ex08 A command line that will search for all files - in the current directory as well as in its sub-directories - with a name ending by ~, or a name that start and end by #

shell01

Exercise Description
ex01 A command line that will display the list of groups for which the login, contained in the environment variable FT_USER , is a member. Separated by commas without spaces
ex02 A command line that searches for all file names that end with ".sh" (without quotation marks) in the current directory and all its sub-directories. It should display only the file names without the .sh
ex03 A command line that counts and displays the number of regular files and directories in the current directory and all its sub-directories. It should include ".", the starting directory
ex04 A command line that displays your machine’s MAC addresses. Each address must be followed by a line break
ex05 A file containing only "42", and NOTHING else. Its name will be "?$'MaRViN'$?"
ex06 A command line that displays every other line for the command ls -l, starting from the first line
ex07 A command line that displays the output of a cat /etc/passwd command, removing comments, every other line starting from the second line, reversing each login, sorted in reverse alphabetical order, and keeping only logins between FT_LINE1 and FT_LINE2 included, and they must separated by ", " (without quotation marks), and the output must end with a "."
ex08 command line that takes numbers from variables FT_NBR1, in ’"?! base, and FT_NBR2, in mrdoc base, and displays the sum of both in gtaio luSnemf base