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
+
cat < file2
## OUTPUT
+
+
# Comparing Files
cmp file1 file2
## OUTPUT
+
+
+
comm file1 file2
## OUTPUT
+
+
diff file1 file2
## OUTPUT
+
+
+
#Filters
@@ -84,16 +95,20 @@ cut -c1-3 file11
## OUTPUT
+
cut -d "|" -f 1 file22
## OUTPUT
+
cut -d "|" -f 2 file22
## OUTPUT
+
+
cat < newfile
```
@@ -108,39 +123,47 @@ hello world
grep Hello newfile
## OUTPUT
+
grep hello newfile
## OUTPUT
+
grep -v hello newfile
## OUTPUT
+
cat newfile | grep -i "hello"
## OUTPUT
+
cat newfile | grep -i -c "hello"
## OUTPUT
+
grep -R ubuntu /etc
## OUTPUT
+
grep -w -n world newfile
## OUTPUT
+
+
cat < newfile
```
@@ -164,59 +187,75 @@ Linux is best in this World
egrep -w 'Hello|hello' newfile
## OUTPUT
+
egrep -w '(H|h)ello' newfile
## OUTPUT
+
egrep -w '(H|h)ell[a-z]' newfile
## OUTPUT
+
egrep '(^hello)' newfile
## OUTPUT
+
egrep '(world$)' newfile
## OUTPUT
+
egrep '(World$)' newfile
## OUTPUT
+
+
egrep '((W|w)orld$)' newfile
## OUTPUT
+
egrep '[1-9]' newfile
## OUTPUT
+
egrep 'Linux.*world' newfile
## OUTPUT
+
+
egrep 'Linux.*World' newfile
## OUTPUT
+
+
egrep l{2} newfile
## OUTPUT
+
egrep 's{1,2}' newfile
## OUTPUT
+
+
cat > file23
```
@@ -235,75 +274,94 @@ cat > file23
sed -n -e '3p' file23
## OUTPUT
+
sed -n -e '$p' file23
## OUTPUT
+
sed -e 's/Ram/Sita/' file23
## OUTPUT
+
sed -e '2s/Ram/Sita/' file23
## OUTPUT
+
sed '/tom/s/5000/6000/' file23
## OUTPUT
+
sed -n -e '1,5p' file23
## OUTPUT
+
+
sed -n -e '2,/Joe/p' file23
## OUTPUT
+
sed -n -e '/tom/,/Joe/p' file23
## OUTPUT
+
seq 10
## OUTPUT
+
seq 10 | sed -n '4,6p'
## OUTPUT
+
seq 10 | sed -n '2,~4p'
## OUTPUT
+
seq 3 | sed '2a hello'
## OUTPUT
+
+
seq 2 | sed '2i hello'
## OUTPUT
+
+
seq 10 | sed '2,9c hello'
## OUTPUT
+
+
sed -n '2,4{s/^/$/;p}' file23
## OUTPUT
+
sed -n '2,4{s/$/*/;p}' file23
@@ -321,6 +379,8 @@ cat > file21
sort file21
## OUTPUT
+
+
cat > file22
```
@@ -334,6 +394,7 @@ cat > file22
uniq file22
## OUTPUT
+
#Using tr command
@@ -341,6 +402,9 @@ uniq file22
cat file23 | tr [:lower:] [:upper:]
## OUTPUT
+
+
+
cat < urllist.txt
```
www. yahoo. com
@@ -357,17 +421,22 @@ www. mrcet.... com
cat urllist.txt | tr -d ' '
## OUTPUT
+
cat urllist.txt | tr -d ' ' | tr -s '.'
## OUTPUT
+
#Backup commands
tar -cvf backup.tar *
## OUTPUT
+
+
+
mkdir backupdir
@@ -378,10 +447,15 @@ cd backupdir
tar -tvf backup.tar
## OUTPUT
+
+
tar -xvf backup.tar
## OUTPUT
+
+
+
gzip backup.tar
ls .gz
@@ -390,6 +464,8 @@ ls .gz
gunzip backup.tar.gz
## OUTPUT
+
+
# Shell Script
```
@@ -400,6 +476,8 @@ chmod 755 my-script.sh
./my-script.sh
## OUTPUT
+
+
cat << stop > herecheck.txt
```
@@ -412,6 +490,8 @@ stop
cat herecheck.txt
## OUTPUT
+
+
cat < scriptest.sh
```bash
@@ -450,18 +530,27 @@ chmod 777 scriptest.sh
## OUTPUT
+
ls file1
## OUTPUT
+
+
+
echo $?
## OUTPUT
+
+
+
./one
bash: ./one: Permission denied
echo $?
## OUTPUT
-
+
+
+
abcd
echo $?
@@ -499,6 +588,7 @@ fi
```
##OUTPUT
+
chmod 755 strcomp.sh
@@ -506,6 +596,8 @@ chmod 755 strcomp.sh
./strcomp.sh
## OUTPUT
+
+
# check file ownership
cat < psswdperm.sh
@@ -533,6 +625,8 @@ fi
./psswdperm.sh
## OUTPUT
+
+
# check if with file location
cat>ifnested.sh
```bash
@@ -579,6 +673,7 @@ fi
./ifnested.sh
## OUTPUT
+
# using numeric test comparisons
@@ -623,6 +718,8 @@ $ chmod 755 iftest.sh
$ ./iftest.sh
##OUTPUT
+
+
# check if a file
cat > ifnested.sh
```bash
@@ -700,6 +797,8 @@ $ chmod 755 elifcheck.sh
$ ./elifcheck.sh
## OUTPUT
+
+
# testing compound comparisons
cat> ifcompound.sh
@@ -716,6 +815,8 @@ $ chmod 755 ifcompound.sh
$ ./ifcompound.sh
## OUTPUT
+
+
# using the case command
cat >casecheck.sh
```bash
@@ -1060,7 +1161,10 @@ ubcdfghj
```
awk -f nc.awk data.dat
## OUTPUT
-
+
+
+
+
cat > palindrome.sh
```bash
#num=545
@@ -1088,6 +1192,8 @@ fi
```
## OUTPUT
+
+
# RESULT:
The Commands are executed successfully.