Meeting Link: Jitsi Meet
First Meet Schedule: 21 January 2023, 11:00 IST
Second Meet Schedule: 28 January 2023, 11:00 IST
Meeting Link: Jitsi Meet
Topic(s):
Reference:
Third Meet Schedule: 4 February 2023, 11:00 IST
Meeting Link: Jitsi Meet
Topic(s):
Reference(s):
Fourth Meet Schedule: 11 February 2023, 11:00 IST
Meeting Link: Jitsi Meet
Topic(s):
Reference(s):
Fifth Meet Schedule: 18 February 2023, 11:00 IST
Meeting Link: Jitsi Meet
Topic(s):
Reference(s):
Sixth Meet Schedule: 25 February 2023, 11:00 IST
Meeting Link: Jitsi Meet
Topic(s):
test
, [
, [[
commands#!
and env
Tasks for the Final Session (Next week):
Anyone completing any one of these tasks will be awarded a digital badge from KanchiLUG similar to the below one
Reference(s):
Final Meet Schedule: 04 March 2023, 11:00 IST
Meeting Link: Jitsi Meet
Topics(s):
Murugan’s task code
#!/bin/sh
dir="$1"
fileExtn="$2"
if [ -n "$dir" ]
then
if [ -n "$fileExtn" ]
then
find "${dir}" -type f -name "*.${fileExtn}"
else
find "${dir}"
fi
else
find "."
fi
Ranjith’s code
#Given a file, write a shell script to detect in which filesystem that given file was stored.
echo "enter the file name with path"
read filename
echo "The file is present in the filesystem:"; stat -f $filename | grep Type | awk '{print $NF}'
Marcel’s code
ls -l | grep '^-'| gawk -v a="`pwd`/" '{print a$NF " " $5 " " $1 }' > /tmp/input.txt
a='';
echo "FILE_FULL_PATH FILE_SIZE FILE_PERMISSIONS FILE_TYPE";
echo "-----------------------------------------------------------------------------------------------------";
while IFS= read -r line
do
a=`echo $line| cut -d ' ' -f1`
b=`file -b $a`
echo "$line "\""$b"\"""
done < /tmp/input.txt
Parameshwar’s code
#!/usr/bin/bash
case $1 in
1)
find $2 -path "*$3";;
2)
find $2 -maxdepth 1 -printf "$(cd $2 && pwd)/%f %k %M %Y\n";;
3)
sudo fdisk -l;;
4)
find $2 -printf "%F\n";;
5)
parent=$(ps -C $2 -o "%p" h)
ps --ppid $parent --pid $parent;;
6)
ps -u $2;;
*)
echo "Unknown Option";;
esac