Commit 797ee894 authored by RATHOD DINESH's avatar RATHOD DINESH

lab03_group24_outlab

parent 34f8fcef
GROUP NUMBER - 24
(150050071, Aahwan), (150050072, Sai Teja), (150050079, Rathod Dinesh).
150050071- 100%
150050072- 100%
150050079- 100%
Comments on the code :
-In taskF.sh, I followed the exact syntax from http://www.thegeekstuff.com/2010/06/bash-conditional-expression/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeekStuff+(The+Geek+Stuff) but still it didnt work. The logic is correct though.
Honour code :
I pledge on my honour that I have not given or received any unauthorized assistance on this assignment or any previous task.
-(150050071, Aahwan)
I pledge on my honour that I have not given or received any unauthorized assistance on this assignment or any previous task.
-(150050072, Sai Teja)
I pledge on my honour that I have not given or received any unauthorized assistance on this assignment or any previous task.
-(150050079, Rathod Dinesh)
Citations :
http://unix.stackexchange.com/questions/94009/how-search-for-a-file-beginning-with-either-a-or-z-and-ending-with-a-or-z
https://www.digitalocean.com/community/tutorials/the-basics-of-using-the-sed-stream-editor-to-manipulate-text-in-linux
http://stackoverflow.com/questions/3984824/sed-command-in-bash
http://stackoverflow.com/questions/22757613/how-to-delete-words-which-start-with-some-specific-pattern-in-a-file-in-unix
http://unix.stackexchange.com/questions/184519/how-to-grep-for-line-length-in-a-given-range
http://www.thegeekstuff.com/2011/01/regular-expressions-in-grep-command/comment-page-1/
http://unix.stackexchange.com/questions/68846/how-do-i-remove-all-sub-directories-from-within-a-directory
http://unix.stackexchange.com/questions/40922/how-do-i-concatenate-all-the-files-in-a-given-directory-in-order-of-date-where
http://unix.stackexchange.com/questions/138669/login-site-using-curl
http://unix.stackexchange.com/questions/55125/alias-for-directory-listing-sorted-by-time-modified-in-reverse-order
http://unix.stackexchange.com/questions/137926/replace-multiple-strings-in-a-single-pass
http://www.thegeekstuff.com/2010/06/bash-conditional-expression/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeekStuff+(The+Geek+Stuff)
Reflection Essay:
Learnt the power of bash.
Operating from the terminal gave some real nerd feels.
Tokyo
subl Downloads/Earth/Asia/Japan/Komatsu/Murakami/江田島/飛騨/Kōnan/こうなん/江南/秋葉/かも/Tokyo
find -size +50000c -size -100000c -print
find -type f -name "[tT]*" -readable -size +50000c -size -100000c -print
GRASS Sceptile
/Earth/Asia/China
sed '/[bBmM]/d' Shanghai | grep -i -e "GRASS [a-z]\{6,10\}$" -e "WATER [a-z]\{6,10\}$"
Magikarp
C.1) rm -r */ //removes all directories recursively
C.2) rm A* //removes files and directories starting with a.
C.3) rm [1][0-9] //removes files with names 10 to 19
rm [1-9] //removes files with names 1 to 9
rm 20 //removes file named 20
C.4) rm *.jpg //removes all jpg files
C.5) cat $(ls) > ultraball.html //concatenates all remaining files
Squirtle
"alpha omega"
curl --data 'username=alpha&password=omega&submit=submit' https://www.cse.iitb.ac.in/~sharat/current/cs251/Assign/Lab03/support/verify.php
cf3c122f1dabdc0fc4e1c37a25556bc8
f24109a62a0422577119abeb0db4f801
10.9.64.239
10.0.2.15
ncat 10.0.2.15 31337 <Bulbasaur >Slowpoke
ncat -l 31337 >Bulbasaur <Slowpoke
for x in *; do
if [ `file -b -i --mime` == 'text/html; charset=us-ascii' ]; then
mv -- "$x" "$x.html"
elif [ `file -b -i --mime` == 'image/jpeg; charset=binary' ]; then
mv -- "$x" "$x.jpeg"
elif [ `file -b -i --mime` == 'text/x-c; charset=us-ascii' ]; then
mv -- "$x" "$x.c"
else
mv -- "$x" "$x.gzip"
fi
done
Magikarp
ls -ltr -l | awk '{print $5}' | sed 1d
sed 's/flying/255 0 0/g;s/fighting/255 0 0/g' corruptedPokémon.ppm
sed 's/Atk:[1][0-9][0-9]/255 8 153/g;s/Def:[1][0-9][0-9]/255 8 153/g;s/Sp.A:[1][0-9][0-9]/255 8 153/g;s/Sp.D:[1][0-9][0-9]/255 8 153/g' corruptedPokémon.ppm
sed 's/HP-[1-3][1-3][1-3]/[1-3][1-3][1-3]/255/g' corruptedPokémon.ppm
#!/bin/bash
dictionary="$1"
while read -r line
do
name="$line"
yes | unzip -q -P "$name" legendaryPokemon.zip
done < "dictionary.txt"
#http://stackoverflow.com/questions/10929453/read-a-file-line-by-line-assigning-the-value-to-a-variable
#http://www.shellhacks.com/en/HowTo-Read-a-file-Line-By-Line
#http://stackoverflow.com/questions/1941242/the-not-so-useless-yes-bash-command-how-to-confirm-a-command-in-every-loop
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment