Find Jobs
Hire Freelancers

URGENT Shell programming

$30-250 USD

Anulowano
Opublikowano około 13 lat temu

$30-250 USD

Płatne przy odbiorze
1 Objectives Programming in a shell scripting language is an essential ability for Systems Administrators who administer UNIX or UNIX-typed systems such as LINUX. This assignment provides an opportunity for you to show your ability in understanding shell scripts which perform a real task. Part A (30 marks) The BASH shell script shown on next page named a1-partA_11T1 is an old version of bash shell script called vncserver. The vncserver was used to start or stop a virtual network computing (VNC) desktop. Your task to create an annotated explanation of this shell script which provides a detailed description of what each line of this shell script does. The shell script file can be downloaded from the course website. For example, the first command line in the script is #!/bin/bash This line tells your system to run the shell script by using bash environment and should be the first line of the shell script. It simply tells the shell which interpreter to use to run this script. Just in case you do not have bash as your standard shell. Assessment criteria for Part A 30 marks have been given to this part and will be assigned in the following ways: 25 to 30 marks : A very good and in depth explanation of the shell script. Shows good understanding of all the material. 20 to 25 marks : Has a few misunderstandings or explanations that aren’t quite up to scratch. 15 to 20 marks :Passable solutions, a few mistakes, some major and not very descriptive. 10 to 15 marks :Major problems. Does not demonstrate a good understanding of the material. Less than 10 : Essentially nothing correct. 1 #!/bin/bash 2 # 3 # chkconfig: - 91 35 4 5 # description: Starts and stops vncserver. \ 6 # used to provide remote X administration services. 7 8 # Source function library. 9 . /etc/init.d/functions 10 11 # Source networking configuration. 12 . /etc/sysconfig/network 13 14 # Check that networking is up. 15 [ ${NETWORKING} = "no" ] && exit 0 16 17 VNCSERVERS="" 18 [ -f /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers 19 20 prog=$"VNC server" 21 22 start() { 23 echo -n $"Starting $prog: " 24 ulimit -S -c 0 >/dev/null 2>&1 25 RETVAL=0 26 for display in ${VNCSERVERS} 27 do 28 echo -n "${display} " 29 unset BASH_ENV ENV 30 WIDTH_HEIGHT="640x480" 31 initlog $INITLOG_ARGS -c \ 32 "su ${display##*:} -c \"cd ~${display##*:} && [ -f .vnc/passwd ] && vncserver :${display%%:*} -geometry ${WIDTH_HEIGHT} -depth 15 \"" 33 RETVAL=$? 34 [ "$RETVAL" -ne 0 ] && break 35 done 36 [ "$RETVAL" -eq 0 ] && success $"vncserver startup" || \ 37 failure $"vncserver start" 38 echo 39 [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vncserver 40 } 41 42 stop() { 43 echo -n $"Shutting down $prog: " 44 for display in ${VNCSERVERS} 45 do 46 echo -n "${display} " 47 unset BASH_ENV ENV 48 initlog $INITLOG_ARGS -c \ 49 "su ${display##*:} -c \"vncserver -kill :${display%%:*}\" >/dev/null 2>&1" 50 done 51 RETVAL=$? 52 [ "$RETVAL" -eq 0 ] && success $"vncserver shutdown" || \ 53 failure $"vncserver shutdown" 54 echo 55 [ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/vncserver 56 } 57 58 # See how we were called. 59 case "$1" in 60 start) 61 start 62 ;; 63 stop) 64 stop 65 ;; 66 restart|reload) 67 stop 68 start 69 ;; 70 condrestart) 71 if [ -f /var/lock/subsys/vncserver ]; then 72 stop 73 start 74 fi 75 ;; 76 status) 77 status Xvnc 78 ;; 79 *) 80 echo $"Usage: $0 {start|stop|restart|condrestart|status}" 81 exit 1 82 esac Part B (10 marks) As a System Administrator, you will easily come across shell scripts written by former employees that have typos, bugs, or logical errors. A BASH shell script on next page named a1-partB_11T1 shows how to create links (either hard or symbolic links) to files from different directories into the current directory. It can save space by not duplicating the contents of the files. However, the script does not work as it has ten (10) mis
Identyfikator projektu: 1033257

Informację o projekcie

4 ofert
Zdalny projekt
Aktywny 13 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
4 freelancerzy składają oferty o średniej wysokości $154 USD dla tej pracy
Awatar Użytkownika
thanks for the invite. let us discuss further
$180 USD w 4 dni
4,8 (115 opinii)
7,2
7,2
Awatar Użytkownika
Hi, please check PMB. Thanks.
$150 USD w 3 dni
5,0 (7 opinii)
3,8
3,8
Awatar Użytkownika
Ready to start :)
$100 USD w 1 dzień
5,0 (1 opinia)
2,0
2,0
Awatar Użytkownika
I have more than 8 years of experience in various scripting languages including bash,sh, perl, python, cgi, powerShell etc.
$185 USD w 2 dni
0,0 (0 opinii)
0,0
0,0

O kliencie

Flaga UNITED KINGDOM
Reading, United Kingdom
4,5
7
Członek od kwi 8, 2011

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.