Find Jobs
Hire Freelancers

bash assignment

$30-250 CAD

Chiuso
Pubblicato più di 5 anni fa

$30-250 CAD

Pagato al completamento
COMP2101 Bash Assignment The bash assignment consists of 3 parts. Each part will contribute to the total assignment mark. The rubric and submission for this assignment is on blackboard. To get full marks for any script, your scripts must have the following elements as covered in class: script interpreter line command line processor using while, shift, and case if the script allows command line options or arguments comments describing the script error messages going to stderr correct exit status Add command line arguments to a script The following script fragment will roll virtual dice and show what was rolled and what the total rolled was. sum=0 while [ $count -gt 0 ]; do roll=$(( $RANDOM % $sides +1 )) sum=$(( $sum + $roll )) echo "Rolled $roll" count=$((count - 1)) done echo "You rolled a total of $sum" This script expects two variables to be defined before it runs. count should contains the number of dice to roll sides should contain the number of sides each die should have Modify the script to allow the user to run the script without any command line arguments which will cause it to roll a pair of 6-sided dice. Accept the following command line options: -h or --help should display command line syntax and exit successfully -c N or --count N should set the count of dice to roll to N, N must be a number from 1 to 9 -s N or --sides N should set the number of sides per die to N, N must be a number from 4 to 20 Display an error message and exit with a failed status if the user puts bad input on the command line. Memory Usage Report Create a simple but human friendly report on memory usage. You can use the free command to get the data for your report. Display a report title Display the total amount of RAM installed and the amount of free RAM Calculate and display the sum of the used and cached RAM Calculate and display the difference between the available and free amounts Calculate and display how much RAM is shared as a percentage of the RAM used Calculate and display how much RAM is used as a percentage of the total RAM Calculate and display how much RAM is used for cache as a percentage of the total RAM Your report should have a title. Each output data item should be appropriately labelled and scaled to display in megabytes. No command line options or arguments are required for this script. Command Source Identification Create a simple script that asks a user for command names, then tells them which software package the command comes from if it comes from a package that is installed on the system. You can use the dpkg -S filepath command to identify the software package. If the user gives no command names as arguments on the command line, ask them for a command name, identify the source according to the rules below, and then ask for the next command name in a loop If the user gives you one or more command names as arguments on the command line, identify sources for them instead of asking for file names Accept a command line help option to display command help Rules for identifying the source of a command name: If the user just hits enter when asked for a command name, exit successfully If the user gives a non-existent command name, give them an error message and move on to the next command name If they give you a command name that didn’t come from a software package, tell them that it didn’t and tell them the full pathname of the file containing the command and who owns that file If they give you a command name that doesn’t come from a file, tell them and move on to the next command name
Rif. progetto: 18102274

Info sul progetto

10 proposte
Progetto a distanza
Attivo 5 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
10 freelance hanno fatto un'offerta media di $184 CAD
Avatar dell'utente
Hello from Greece, Do you have ssh aceess to the server? Would you like to have a chat? Regards, Dimitsi
$555 CAD in 3 giorni
4,9 (344 valutazioni)
6,9
6,9
Avatar dell'utente
Hello How are you? I'm a System Engineer with coding skills. I had done many projects using Bash scripting. I can help. Regards.
$250 CAD in 3 giorni
5,0 (27 valutazioni)
4,7
4,7
Avatar dell'utente
Hi, Looks like this is an assignment work. I can write a bash script for your requirement. But would like to know when you need. I cannot write in 5 or 10 hours as i already have some project ongoing. If you give me 24 hours, i can complete and give it for you. You can review my profile and if interested please contact. Thanks
$66 CAD in 3 giorni
5,0 (20 valutazioni)
4,7
4,7
Avatar dell'utente
Hello, I have done this script earlier and can provide the answer now. You can check the script and pay. I have also done the scripts "Add command line arguments to a script" and "Command Source Identification" The script for `Memory Usage Report` is not done. I can do it in few hours. Let me know if you are interested
$200 CAD in 0 giorno
5,0 (11 valutazioni)
2,7
2,7
Avatar dell'utente
hello,how are you. i read your bid carefully. i am c/c++, linux expert and have full experience for 10 years. c/c++, linux is my top skill and i can complete your project by using c/c++, linux. i can provide most quality and high speed. if you want to success, please contact me. Then, I will give you good result to the proposals. hire me.
$155 CAD in 3 giorni
5,0 (1 valutazione)
2,8
2,8
Avatar dell'utente
Hi, I have 10 years of exp. writing bash. I can do this easily. Full comments No release of money without working script. Chat with me.
$100 CAD in 4 giorni
0,0 (0 valutazioni)
0,0
0,0
Avatar dell'utente
I am a programmer who did a lot of programming for fun during my nerd years, before I actually came to college. During that time I read a lot about bash scripting, and I think I can easily do this task. As proof of concept , i attach the first part of the task with the bid. Please let me know what you have studied in class so i can fine tune this. I have just started freelancing and I do not have any issue with accepting a low payment for my first project. I will be available in the time period: 10 am to 12 pm, GMT +5. #!/usr/bin/env bash count=0 sides=0 while [[ $# -gt 0 ]] do key="$1" case $key in -c) count="$2" shift # past argument shift # past value ;; -s) sides="$2" shift # past argument shift # past value ;; esac done # echo $ $count if !([ "$count" -ge 1 ] && [ "$count" -le 9 ]);then echo "The variable count has an invalid value" > /dev/stderr fi if !([ "$sides" -ge 4 ] && [ "$sides" -le 20 ]);then echo "The variable sides has an invalid value" > /dev/stderr fi sum=0 while [ "$count" -gt "0" ]; do roll=$(( $RANDOM % $sides +1 )) sum=$(( $sum + $roll )) echo "Rolled $roll" count=$((count - 1)) done echo "You rolled a total of $sum"
$30 CAD in 0 giorno
0,0 (0 valutazioni)
0,0
0,0
Avatar dell'utente
This is a good opportunity to write an well documented script to meet your needs. It should not be rushed and it should be awarded to someone dedicated to quality and that knows how to deliver clean scripts. I am sure you will have less expensive bids but I am sure they will miss some of the requirements. I will not. I have been writing scripts for System Administration tasks of very large networks and I know how to deliver on time and with high quality.
$250 CAD in 5 giorni
0,0 (0 valutazioni)
0,0
0,0
Avatar dell'utente
I have good experience in this and can deliver as per details mentioned in this project. Please let me know if we can discuss further.
$200 CAD in 7 giorni
0,0 (0 valutazioni)
0,0
0,0

Info sul cliente

Bandiera: CANADA
Toronto, Canada
0,0
0
Membro dal nov 5, 2018

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.