Skip to content

dam-ari/ops-and-down

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpSystems

  1. Ex1: ⚒️ Gcc Find; 🎾 Tennis ; 💲Shell


    ⚒️ Gcc Find:


    a nice little script for compiling all the c files in the folder that contains a specific word. You can turn on th -r flag for recessiveness

    ⚙️How To⚙️

    • Clone the script to a folder of your choice
    • Run the gcc.sh file with the following params:
      1. folder name to be compiled
      2. a word. only files that contains the given word will be complied ::must!
      3. optional: -r flag, if you want to compile the inner files as well.

    > ./gccfind.sh myFolder main -r


    🎾 Tennis (paper game):


    a funny little [tennis paper game](https://en.wikipedia.org/wiki/Tennis_(paper_game)), terminal styled. #### ⚙️How To⚙️ There are two options for the game: in place game, and logged history game You can choose what to use by simply run the game with flags: * __for in place game:__ --in-place | -p * __for logged game :__ --l | -log * The default version is logged

    > ./tennis.sh -p


    💲 Shell:


    a shell program that can be loaded with your custom commands

    ⚙️How To⚙️

    • compile myshell.c gcc -o shell myshell.c
    • There are two options:
      you can run the runnable script without any other params.
      The program will act as you expect from a normal shell
      Or you can send path to a folder, which contains custom scrits. The folder be then added temporarily to your env variables,
      so you can can any script that is defined there by simply typing it's name.

    for example: if inside a folder named 'myCommands' you have a script named 'do-somthing.sh'
    you can run the shell with the path to 'myCommads', then you can just type do-something.sh ,
    no matter what pwd you are in.

    > ./myshell ~/myCommands


  1. Ex2: 📂 File Comperator & Grader


    2.1: Files Comperator


    a program that get two arguments of file pathes and determines the similarity:
    🔖 1: The files are identical
    🔖 2: The files are different
    🔖 3: The files are similar

    > ./comp.out /home/os20 12 /code/1.txt /home/os20 12 /code/2.txt

    2.2: Grader


    A program that gets config path and grades the folders by that
    The config file contains 3 rows:
    ✏️ 1: Path to parent folder which contains sub-folders for grade. Each folder is a user folder.
    ✏️ 2: Path to an input file for will-be executed program
    ✏️ 3: Path to correct output file
    The program iterates through the users' folders, compiles(if exists) the c file in that folder. Then runs the compiled program with the input file and comperes the results to the correct output from the config file. If anything in the way is getting wrong, the grade will be affected as listing here:
    > > > > > ✨ NO_C_FILE : 0
    > > > > > ✨ COMPILATION_ERROR: 10
    > > > > > ✨ TIMEOUT: 20
    > > > > > ✨ WRONG: 50
    > > > > > ✨ SIMILAR: 75
    The grade will be written into an excel file, named results.csv, which will be created inside the running folder.

    > ./a.out /home/os20 12 /conf.txt


  1. Ex3: 🗞️ Publisher: content producer-distributer-coeditor Threads Synchronization


    A program that gets a config file for products per procuder, and coediting abilities. The program syncronizing the work of everyone by threads
    To create executable you can use the makefile ⚡ > ./ex3.out config.txt