CBKADAL
OSP Weekly Assignments
C. BinKadal --- Sendirian, Berhad.


OS Week 02 Assignment #6: Assignment Script

Copy from demos:

TARBALL=WEEK02.tar.xz.asc
TARDIR=$HOME/git/demos/WEEK
if [ -d $TARDIR/ ] ; then
  cd $TARDIR/
  git pull
  mkdir -pv $HOME/mywork/
  cd $HOME/mywork/
  cp -v $TARDIR/$TARBALL .
  ls -al
else
  echo "ERROR: no $TARDIR directory!"
fi


Decrypt file WEEK02.tar.xz.asc

  • The passphrase/password will be announced at SCELE at the beginning of the week.
gpg --yes -o WEEK02.tar.xz -d WEEK02.tar.xz.asc


Extract TARBALL

tar xfv WEEK02.tar.xz
cd WEEK02/
ls -al


Check Scripts

for II in [0-9][0-9]* ; do
    echo ""
    echo "= === ==== FILE $II..."
    echo "= === ==== ==== ==== ==== ==== ==== ===="
    cat  "$II"
    sleep 2
done


Run Scripts

bash 00_Basic_Check.sh

bash 01_Version_Check.sh


Check RESULT

cd $HOME/RESULT/W02/
ls -al

The result will be similar to the following. Check if there are error messages inside these files:


WEEKXX-00-BASIC.txt

  • This example was from WEEK08
ZCZC 0CA6553 WEEKSQ 08 00
ZCZC 0C9067F VERSUM 24:97E47A0D 24:97E47A0D
ZCZC 0CECA40 VERINC 78:30C52C2B 78:30C52C2B
ZCZC 0C879E5 SCRIPT # REV31: Sun 08 Sep 2024 08:00
ZCZC 0C7751B XCHECK HOST cbkadal USER cbkadal GROUP cbkadal HOME /home/cbkadal/ ARCH x86_64 NPROC 4
ZCZC 0C9D06E LCLANG en_AU.UTF-8
ZCZC 0C0E93C CMODEL Model name: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
ZCZC 0CBF24D VERDSK 23G 32G 995EA15D56A7 487B2532E406
ZCZC 0CD6FB5 MEMORY 3.8Gi(total) 150Mi(used) 3.3Gi(free) 492Ki(shared) 430Mi(buffer) 974Mi(free swap)
ZCZC 0C3BC07 CMOUN1 /dev/sdb2 /mnt/lfs ext4 rw,relatime 0 0
ZCZC 0CFEB97 CMOUN2 /dev/sdb1 /mnt/cbkadal ext4 rw,relatime 0 0
ZCZC 0CDEE6A CMOUN3 ThisIsADummy: does not exists
ZCZC 0CFF622 VERLNX 6.11.6-VBX64-2411-0
ZCZC 0C950B6 DISTRO Description: Debian GNU/Linux 12 (bookworm)
ZCZC 0C46D19 CHDIR1 RESULT YES
ZCZC 0CB5894 CHDIR2 mydemo YES
ZCZC 0CF9757 CHDIR3 mywork YES
ZCZC 0C02E55 CHDIR4 git/os242/TXT YES
ZCZC 0C9E4AE CHDIR5 git/demos YES
ZCZC 0C9A5C0 CHDIR6 myBACKUP YES
ZCZC 0C41C57 RESULT ===== RESULT IN /home/cbkadal/RESULT/W08/WEEK08-00-BASIC.txt =====


WEEKXX-01-VERSION.txt

  • This example was from WEEK08
OK:    Apt       2.6.1  >= 2.6
OK:    Bash      5.2.15 >= 5.2
OK:    Binutils  2.40   >= 2.40
OK:    Bison     3.8.2  >= 3.8
OK:    Coreutils 9.1    >= 9.1
OK:    Diffutils 3.8    >= 3.8
OK:    Dpkg      1.21.22 >= 1.21
OK:    Findutils 4.9.0  >= 4.9
OK:    Fusermount 2.9.9  >= 2.9
OK:    Gawk      5.2.1  >= 5.2
OK:    GCC       12.2.0 >= 12.2
OK:    GCC (C++) 12.2.0 >= 12.2
OK:    Git       2.39.5 >= 2.39
OK:    Gnupg     2.2.40 >= 2.2
OK:    Grep      3.8    >= 3.8
OK:    Gzip      1.12   >= 1.12
OK:    Lynx      2.9.0dev >= 2.9
OK:    M4        1.4.19 >= 1.4.19
OK:    Make      4.3    >= 4.3
OK:    Patch     2.7.6  >= 2.7
OK:    Perl      5.36.0 >= 5.36
OK:    Python    3.11.2 >= 3.11
OK:    Rsync     3.2.7  >= 3.2
OK:    Sed       4.9    >= 4.9
OK:    Tar       1.34   >= 1.34
OK:    Texinfo   6.8    >= 6.8
OK:    Xz        5.4.1  >= 5.4
OK:    Linux Kernel 6.11.6 >= 6.1
OK:    Linux Kernel supports UNIX 98 PTY
Aliases:
OK:    awk  is GNU
OK:    yacc is Bison
OK:    sh   is Bash
Compiler check:
OK:    g++ works
ZCZC 0C2ADA5 WEEKSQ 08 01
ZCZC 0C36FD1 VERSUM 79:1A44FAA5 79:1A44FAA5
ZCZC 0C66CD1 VERINC 78:30C52C2B 78:30C52C2B
ZCZC 0C84C67 SCRIPT # REV26: Tue 05 Nov 2024 15:00
ZCZC 0C05D78 RESULT ===== RESULT IN /home/cbkadal/RESULT/W08/WEEK08-01-VERSION.txt =====


WEEKXX-DEMO-CHECK.txt

  • This example was from WEEK02
ZCZC 18D0043 DEMOCHECK poxnqnyJ02poxnqny




© 2024-2024 --- C. BinKadal --- Revision: Wed 20 Nov 2024 07:00.