From 4bb4a051cc89ec144215c9a21a2154da5b5d2925 Mon Sep 17 00:00:00 2001 From: Nivethacse-2008 Date: Fri, 1 May 2026 19:59:53 +0530 Subject: [PATCH] Update README.md --- README.md | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31bb14f21..35abbc8a1 100644 --- a/README.md +++ b/README.md @@ -43,23 +43,34 @@ s.n. dasgupta cat < file1 ## OUTPUT +Screenshot 2026-04-30 133128 cat < file2 ## OUTPUT +Screenshot 2026-04-30 133137 + # Comparing Files cmp file1 file2 ## OUTPUT + +Screenshot 2026-04-30 133146 + comm file1 file2 ## OUTPUT +Screenshot 2026-04-30 133315 + diff file1 file2 ## OUTPUT +Screenshot 2026-04-30 133323 + + #Filters @@ -84,16 +95,20 @@ cut -c1-3 file11 ## OUTPUT +Screenshot 2026-05-01 184010 cut -d "|" -f 1 file22 ## OUTPUT +Screenshot 2026-05-01 184044 cut -d "|" -f 2 file22 ## OUTPUT +Screenshot 2026-05-01 104348 + cat < newfile ``` @@ -108,39 +123,47 @@ hello world grep Hello newfile ## OUTPUT +Screenshot 2026-05-01 104604 grep hello newfile ## OUTPUT +Screenshot 2026-05-01 104629 grep -v hello newfile ## OUTPUT +Screenshot 2026-05-01 104658 cat newfile | grep -i "hello" ## OUTPUT +Screenshot 2026-05-01 104730 cat newfile | grep -i -c "hello" ## OUTPUT +image grep -R ubuntu /etc ## OUTPUT +Screenshot 2026-05-01 104751 grep -w -n world newfile ## OUTPUT +Screenshot 2026-05-01 104823 + cat < newfile ``` @@ -164,59 +187,75 @@ Linux is best in this World egrep -w 'Hello|hello' newfile ## OUTPUT +Screenshot 2026-05-01 104823 egrep -w '(H|h)ello' newfile ## OUTPUT +Screenshot 2026-05-01 104856 egrep -w '(H|h)ell[a-z]' newfile ## OUTPUT +Screenshot 2026-05-01 104923 egrep '(^hello)' newfile ## OUTPUT +Screenshot 2026-05-01 114224 egrep '(world$)' newfile ## OUTPUT +Screenshot 2026-05-01 114224 egrep '(World$)' newfile ## OUTPUT +Screenshot 2026-05-01 114304 + egrep '((W|w)orld$)' newfile ## OUTPUT +Screenshot 2026-05-01 114341 egrep '[1-9]' newfile ## OUTPUT +Screenshot 2026-05-01 114456 egrep 'Linux.*world' newfile ## OUTPUT +Screenshot 2026-05-01 114456 + egrep 'Linux.*World' newfile ## OUTPUT +Screenshot 2026-05-01 114545 + egrep l{2} newfile ## OUTPUT +Screenshot 2026-05-01 114740 egrep 's{1,2}' newfile ## OUTPUT +Screenshot 2026-05-01 115052 + cat > file23 ``` @@ -235,75 +274,94 @@ cat > file23 sed -n -e '3p' file23 ## OUTPUT +image sed -n -e '$p' file23 ## OUTPUT +Screenshot 2026-05-01 115122 sed -e 's/Ram/Sita/' file23 ## OUTPUT +Screenshot 2026-05-01 115200 sed -e '2s/Ram/Sita/' file23 ## OUTPUT +Screenshot 2026-05-01 115245 sed '/tom/s/5000/6000/' file23 ## OUTPUT +Screenshot 2026-05-01 115312 sed -n -e '1,5p' file23 ## OUTPUT +Screenshot 2026-05-01 115350 + sed -n -e '2,/Joe/p' file23 ## OUTPUT +Screenshot 2026-05-01 115350 sed -n -e '/tom/,/Joe/p' file23 ## OUTPUT +Screenshot 2026-05-01 115512 seq 10 ## OUTPUT +Screenshot 2026-05-01 115550 seq 10 | sed -n '4,6p' ## OUTPUT +Screenshot 2026-05-01 115632 seq 10 | sed -n '2,~4p' ## OUTPUT +image seq 3 | sed '2a hello' ## OUTPUT +Screenshot 2026-05-01 115754 + seq 2 | sed '2i hello' ## OUTPUT +Screenshot 2026-05-01 115824 + seq 10 | sed '2,9c hello' ## OUTPUT +Screenshot 2026-05-01 115854 + sed -n '2,4{s/^/$/;p}' file23 ## OUTPUT +Screenshot 2026-05-01 115948 sed -n '2,4{s/$/*/;p}' file23 @@ -321,6 +379,8 @@ cat > file21 sort file21 ## OUTPUT +Screenshot 2026-05-01 120233 + cat > file22 ``` @@ -334,6 +394,7 @@ cat > file22 uniq file22 ## OUTPUT +Screenshot 2026-05-01 120304 #Using tr command @@ -341,6 +402,9 @@ uniq file22 cat file23 | tr [:lower:] [:upper:] ## OUTPUT +image + + cat < urllist.txt ``` www. yahoo. com @@ -357,17 +421,22 @@ www. mrcet.... com cat urllist.txt | tr -d ' ' ## OUTPUT +Screenshot 2026-05-01 120705 cat urllist.txt | tr -d ' ' | tr -s '.' ## OUTPUT +Screenshot 2026-05-01 120817 #Backup commands tar -cvf backup.tar * ## OUTPUT +image + + mkdir backupdir @@ -378,10 +447,15 @@ cd backupdir tar -tvf backup.tar ## OUTPUT +image + tar -xvf backup.tar ## OUTPUT +image + + gzip backup.tar ls .gz @@ -390,6 +464,8 @@ ls .gz gunzip backup.tar.gz ## OUTPUT +image + # Shell Script ``` @@ -400,6 +476,8 @@ chmod 755 my-script.sh ./my-script.sh ## OUTPUT +image + cat << stop > herecheck.txt ``` @@ -412,6 +490,8 @@ stop cat herecheck.txt ## OUTPUT +Screenshot 2026-05-01 121952 + cat < scriptest.sh ```bash @@ -450,18 +530,27 @@ chmod 777 scriptest.sh ## OUTPUT +image ls file1 ## OUTPUT +Screenshot 2026-05-01 120830 + + echo $? ## OUTPUT + +Screenshot 2026-05-01 120844 + ./one bash: ./one: Permission denied echo $? ## OUTPUT - + + Screenshot 2026-05-01 120844 + abcd echo $? @@ -499,6 +588,7 @@ fi ``` ##OUTPUT +Screenshot 2026-05-01 122624 chmod 755 strcomp.sh @@ -506,6 +596,8 @@ chmod 755 strcomp.sh ./strcomp.sh ## OUTPUT +Screenshot 2026-05-01 122807 + # check file ownership cat < psswdperm.sh @@ -533,6 +625,8 @@ fi ./psswdperm.sh ## OUTPUT +image + # check if with file location cat>ifnested.sh ```bash @@ -579,6 +673,7 @@ fi ./ifnested.sh ## OUTPUT +Screenshot 2026-05-01 193113 # using numeric test comparisons @@ -623,6 +718,8 @@ $ chmod 755 iftest.sh $ ./iftest.sh ##OUTPUT +image + # check if a file cat > ifnested.sh ```bash @@ -700,6 +797,8 @@ $ chmod 755 elifcheck.sh $ ./elifcheck.sh ## OUTPUT +Screenshot 2026-05-01 193940 + # testing compound comparisons cat> ifcompound.sh @@ -716,6 +815,8 @@ $ chmod 755 ifcompound.sh $ ./ifcompound.sh ## OUTPUT +image + # using the case command cat >casecheck.sh ```bash @@ -1060,7 +1161,10 @@ ubcdfghj ``` awk -f nc.awk data.dat ## OUTPUT - + + Screenshot 2026-05-01 145122 + + cat > palindrome.sh ```bash #num=545 @@ -1088,6 +1192,8 @@ fi ``` ## OUTPUT +image + # RESULT: The Commands are executed successfully.