Find Jobs
Hire Freelancers

URGENT Shell programming

$30-250 USD

Cancelado
Publicado há aproximadamente 13 anos

$30-250 USD

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

Sobre o projeto

4 propostas
Projeto remoto
Ativo há 13 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
4 freelancers estão ofertando em média $154 USD for esse trabalho
Avatar do Usuário
thanks for the invite. let us discuss further
$180 USD em 4 dias
4,8 (115 avaliações)
7,2
7,2
Avatar do Usuário
Hi, please check PMB. Thanks.
$150 USD em 3 dias
5,0 (7 avaliações)
3,8
3,8
Avatar do Usuário
Ready to start :)
$100 USD em 1 dia
5,0 (1 avaliação)
2,0
2,0
Avatar do Usuário
I have more than 8 years of experience in various scripting languages including bash,sh, perl, python, cgi, powerShell etc.
$185 USD em 2 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED KINGDOM
Reading, United Kingdom
4,5
7
Membro desde abr. 8, 2011

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.