Find Jobs
Hire Freelancers

bash assignment

$30-250 CAD

Fechado
Publicado há mais de 5 anos

$30-250 CAD

Pago na entrega
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
ID do Projeto: 18102274

Sobre o projeto

10 propostas
Projeto remoto
Ativo há 5 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
10 freelancers estão ofertando em média $184 CAD for esse trabalho
Avatar do Usuário
Hello from Greece, Do you have ssh aceess to the server? Would you like to have a chat? Regards, Dimitsi
$555 CAD em 3 dias
4,9 (344 avaliações)
6,9
6,9
Avatar do Usuário
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 em 3 dias
5,0 (27 avaliações)
4,7
4,7
Avatar do Usuário
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 em 3 dias
5,0 (20 avaliações)
4,7
4,7
Avatar do Usuário
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 em 0 dia
5,0 (11 avaliações)
2,7
2,7
Avatar do Usuário
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 em 3 dias
5,0 (1 avaliação)
2,8
2,8
Avatar do Usuário
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 em 4 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
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 em 0 dia
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
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 em 5 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
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 em 7 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) CANADA
Toronto, Canada
0,0
0
Membro desde nov. 5, 2018

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.