lab2

parent 71303707
Three idiots
1 - Rama Mahidhar Reddy Kancharla (160050091)
2 - Sai Praneeth Reddy ( 160050100)
5 - Shantanu Kumar (160050069)
3 & 4 all three collaborated in searching and writing the code
#!/bin/bash
let "a = $1"
let "b = a+1"
let "c=a"
let "d=b*c"
let "e=d/2"
echo $e
\ No newline at end of file
./script1.sh 5 >> out
./script1.sh 10 >> out
./script1.sh 20 >> out
diff out output/testcase >> result
if [[ -s result ]];
then
echo fail
else
echo success
fi
rm out result
#!/bin/bash
echo $(ls -l $1 | grep -c ^d)
\ No newline at end of file
mkdir testcase
mkdir testcase/test1
mkdir testcase/test2
mkdir testcase/test1\ test2/
./script2.sh testcase > out
echo 3 > tc
diff out tc > result
if [[ -s result ]];
then
echo fail
else
echo success
fi
rm -r testcase
rm tc out result
#!/bin/bash
myvar=$(cat $1)
for value in $myvar
do
if [ -d $value ]
then
echo could not create $value
else
mkdir $value
echo created $value
fi
done
./script3.sh testcase/input1 > out
diff out testcase/output1 >> result
rm -r test1 test2
./script3.sh testcase/input2 > out
diff out testcase/output2 >> result
rm -r test1 test2 test3
if [[ -s result ]];
then
echo fail
else
echo success
fi
rm out result
created test1
created test2
could not create test1
created test1
created test2
created test3
#!/bin/bash
var=$(cat $1)
max1=$( echo $var | cut -d' ' -f 1 )
max2=$( echo $var | cut -d' ' -f 2 )
i=3
n=$( wc -w $1 | cut -d' ' -f 1)
while [ $i -le $n ]
do
num1=$( echo $var | cut -d' ' -f $i )
((i++))
if [ $max1 -lt $num1 ]
then
temp=$max1
max1=$num1
max2=$temp
num1=-1
fi
if [ $max2 -lt $num1 ]
then
max2=$num1
fi
done
echo $(expr $max2 + $max1)
echo $(expr $max2 \* $max1)
./script4.sh testcase/input1 >> out
./script4.sh testcase/input2 >> out
./script4.sh testcase/input3 >> out
diff out testcase/output >> result
if [[ -s result ]];
then
echo fail
else
echo success
fi
rm out result
30 79 83 77 7 12 61 16 92 27 19 47 39 72 0 94 24 36 32 34 0 87 78 20 2 25 81 38 66 70 70 97 1 5 26 9 18 87 77 62 15 96 9 6 21 61 0 97 50 85
\ No newline at end of file
966 822 958 943 12 611 862 694 740 795 602 520 494 837 937 822 703 298 545 369 921 466 835 917 415 208 362 223 131 98 178 449 920 489 745 284 452 607 330 192 402 285 712 248 122 1 423 825 652 968 547 573 786 734 842 202 295 204 777 426 302 307 227 575 796 972 859 249 579 542 793 333 827 858 582 949 211 5 775 863 973 674 788 759 408 630 313 703 834 90 481 489 398 709 64 546 681 275 147 613
\ No newline at end of file
21971 82218 57150 60531 7171 5488 37570 56187 22386 92198 66073 81525 19617 91763 27274 78605 62649 13756 30795 13318 30399 31293 10187 89654 48192 26083 42324 38169 54175 45687 87776 92498 44258 44926 53029 67781 50415 6951 23968 89153 99150 6394 87030 35119 98157 14304 13724 77158 44412 60871 90476 74812 92164 17015 80818 56708 43099 23143 11230 13626 85182 99006 6124 45792 43932 75505 13573 10699 82456 53894 16204 81606 60288 19587 33077 74797 50243 46801 51955 94656 24024 58783 85820 32541 75799 82990 89249 35250 22485 16831 65228 7668 32189 71352 69812 92474 63209 83386 3173 62017 37280 35730 59976 13920 55317 93053 88717 21912 39855 57024 32920 80231 32159 18740 12772 7958 18083 18374 59560 40568 51557 24788 48236 83747 12492 18049 76221 75701 17787 95746 37719 71419 31476 97695 85339 3145 90748 90408 25058 46955 63784 57978 43539 95943 93071 56311 20254 11154 91037 79814 51722 42595 20955 16311 26342 33447 50712 2563 25501 84851 14661 79572 56270 46138 93619 57961 65635 719 64721 7045 64027 28505 81376 7566 40800 90799 63877 61054 18305 71267 57221 86379 13862 94528 2690 40204 27975 69754 59119 69828 54605 90132 49400 27227 52622 59371 85188 18258 60091 49909 41655 24118 94766 23031 48036 35567 13830 11913 12973 32135 99532 70194 18515 13394 64722 37557 69950 9050 23664 45421 95230 94621 35554 60983 21849 88176 20354 7037 22786 80445 73299 64442 20915 68065 87473 68951 19984 17656 97217 32958 66143 96749 3152 1010 26496 84227 54920 96446 93277 78584 58220 4859 73205 93774 65842 95054 98302 86197 18444 21089 82994 8095 85531 3910 92512 89356 89213 12497 23364 2782 45455 5860 15884 64959 6870 42380 49186 61790 38826 58815 56726 97046 63675 29932 7172 29517 41338 5475 32066 76134 42916 15061 84229 44799 35323 76742 50507 40888 5591 73872 43671 51046 79732 59555 16005 2954 1935 81544 64745 57113 40359 37823 70512 20386 67755 94036 49904 25446 99511 98322 17932 58779 13383 18514 3578 65058 11608 54086 5947 17199 44310 49618 68245 40394 25525 602 43348 43812 82146 24445 925 22506 62269 87789 59244 46376 81826 9148 88174 97689 23823 6107 56469 37206 24621 60047 18617 52581 14133 24564 69780 74795 90534 54377 15189 16059 54979 58538 76223 37126 99335 77148 75984 61604 81290 35228 7981 63116 60729 12507 60805 84552 18614 17274 38110 59587 77322 56727 12168 7807 97643 81948 82603 88177 52677 14144 20588 7657 72682 96811 61135 72018 90312 37119 49974 71602 88699 74307 51070 49428 86815 11875 50332 21781 45502 88443 81369 39176 61522 9889 63335 59166 91838 45938 47343 44515 76435 84284 68524 65469 81095 29659 37487 87759 83130 3814 75713 71830 78121 26783 37610 81288 55011 87943 3070 513 92738 84439 56041 54260 94328 19376 29778 2518 81667 93474 63386 58102 77758 48262 23571 75205 77922 77411 79317 61052 81225 55030 49234 75698 98166 86845 56987 53177 74788 60057 70042 83878 60848 26083 54490 71528 45459 84269 74047 27126 77743 53785 1580 71853 2047 25152 47058 96321 18915 26375 73726 140 97758 22960 92190 95924 9805 49177 49101 945 25586 35495 84823 86434 61578 55666 74315 23389 39935 48362 66868 34030 18499 68448 5883 36898 93600 69293 33220 12515 12021 6946 29007 9779 46258 21198 22055 72416 86727 87508 73361 28666 23003 74537 31452 84581 30203 5767 7970 86490 70481 74838 20520 88980 59639 42755 42231 69591 12048 75451 98459 40421 98749 27466 50200 61359 65016 88607 33775 68096 76115 7137 96762 99118 98026 28214 51 28229 33982 24374 31071 4463 15564 51591 9796 75203 94346 52027 44795 22746 43830 43254 63168 58931 87072 29720 20290 52089 18328 54066 36537 94443 77555 33299 93562 75581 77865 9965 20162 11847 34339 51233 32663 49904 2824 42459 25107 13522 10838 69902 52620 54668 29508 15788 13599 16581 61861 33889 85022 80189 4307 21559 90984 81862 71210 898 57443 49075 10864 77605 60923 45203 28838 93586 95107 48014 52397 36567 77888 63235 22821 30509 17903 52330 62649 47854 68911 24510 98095 70285 21051 2403 91844 28388 84265 63054 29286 41709 12129 56502 19314 89404 18058 64505 99342 29517 28871 68091 66084 6760 31326 88906 53621 65581 57588 16270 29787 42851 57133 27883 13136 94536 30286 4980 22924 14551 84386 68563 56260 12867 25065 91927 18624 43123 72784 17966 72641 1655 86058 55077 24767 33736 60335 78388 15670 17923 11011 45457 60774 84496 73340 73910 79032 3626 95242 18309 18178 79628 3224 90790 8848 28289 99069 27472 87765 71853 61790 76758 89861 64200 31835 14628 97937 8523 93017 13607 26446 20380 75416 87221 4876 48757 61131 260 68735 56374 34921 86913 52354 38145 94056 77554 66435 93125 5026 70552 64979 66817 63662 54840 31017 11849 85820 45306 20372 95189 75265 46819 15569 50682 34040 36797 15791 11523 53410 84526 84249 88331 71440 36604 26477 81848 30510 9264 74973 35537 79816 56304 18706 43478 27496 66075 71679 13317 27734 92052 8506 2999 38871 40428 70033 89263 93577 85824 786 46987 70351 85036 35319 58143 37992 61796 39991 68502 71060 31316 20391 67228 87621 55449 27058 15117 37877 98737 44786 65611 90789 69645 68610 29660 26425 38644 35275 20002 40820 36062 66990 11171 37450 18661 85666 91794 80457 25657 76648 67869 56974 97040 35097 60947 68841 62155 92416 6718 60892 53555 72329 68034 23200 57292 14046 49625 12288 49322 85979 53108 1736 69321 80632 39186 87982 66298 30980 84791 8308 7628 52660 81634 21020 4109 42581 89862 82616 34997 12932 59861 88552 1614 27895 28104 58906 41941 94081 87546 7615 80061 57006 9351 49382 37638 64889 53717 20289 95869 38508 28597 19850 91169 10231 40870 11630 52812 47084 94247 4161 60017 54108 9066 61631 98355 53522 36889 56648 47604 24435 64264 44017 97793 89967 93399 35432 54857 47116 55721 67078 1977 670 86928 93146 10901 44151 21128 80065 91235 15375 578 67604 85835 9644 29235 84190 79519 82476 57191 27123 6911 21455 71140 21057 27774 80891 56489 82631 44360 28562 49710 46337 45584 36638 55835 56485 80789 76963 52902 88377 8691 53480 55981 94526 79477 1569 95069 58996 84045 52260 2471 7309 90067 73611 28366 17841 70854 1207 16825
194
9409
1945
945756
198682
9868597800
#!/bin/bash
myvar=$1
sed -i 's/\bmighty\b/dumb/I' $myvar
./script5.sh testcase/input > out
diff out testcase/output > result
if [[ -s result ]];
then
echo fail
else
echo success
fi
rm out result
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
three idiots
alias in q1 : use command 'size_list'
alias in q5 : use command 'weather'
1 : 160050069
2 : 160050091
5 : 160050100
3 ,4 ,6 ,extras : All three of us collaborated
1) googler : screenshot of google search for "game of thrones"
2) zsh : "weather" alias added to .zshrc and screenshot illustrates the usage of weather in "zsh"
3) ohmyzsh : screenshot showing installation success.
references : ryan tutorials , google (basically stack overflow)
github for googler and oh-my-zsh.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for example
alias size_list='
for value in "*"
do
du -s $value
done
echo Total - $(du -s)'
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
echo '
██╗ ██╗███████╗██╗ ██╗ ██████╗ ███████╗██████╗ ██╗███████╗███╗ ██╗██████╗ ███████╗
██║ ██║██╔════╝██║ ██║ ██╔═══██╗ ██╔════╝██╔══██╗██║██╔════╝████╗ ██║██╔══██╗██╔════╝
███████║█████╗ ██║ ██║ ██║ ██║ █████╗ ██████╔╝██║█████╗ ██╔██╗ ██║██║ ██║███████╗
██╔══██║██╔══╝ ██║ ██║ ██║ ██║ ██╔══╝ ██╔══██╗██║██╔══╝ ██║╚██╗██║██║ ██║╚════██║
██║ ██║███████╗███████╗███████╗╚██████╔╝ ██║ ██║ ██║██║███████╗██║ ╚████║██████╔╝███████║
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚══════╝╚═╝ ╚═══╝╚═════╝ ╚══════╝
'
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
#!/bin/bash
result=0
funct() {
for afile in $1*
do
n=$(echo $(ls -lR $1 | grep ^d | wc -l))
if [ -d $afile ]
then
funct $afile/
else
nooflines=0
wcout=$(wc -l $afile)
n=$(echo $wcout | cut -d' ' -f 1)
j=1
while [ $j -le $n ]
do
line=$(cat $afile | cut -d'
' -f $j)
wordcount=$(echo $line | wc -w)
if [ $wordcount -gt 0 ]
then
((nooflines++))
fi
((j++))
done
let " result = $result + $nooflines "
fi
done
}
funct $1
echo $result
#sed'/^\s*$/d' | wc -l
\ No newline at end of file
Tech-knights,Neelesh verma,160050062,Vamshi sevakula,160050079,Gunti Dheeraj kumar,160050081
Team in the North,Ishan Tarunesh,160050054,Priyanshu Meel,160050052,Shivam Patel,160050003
DELTA,S.Sai Kalyan,160050095,V.Niranjan,160050099,N.Suraj,160050087
Shinigami,Suraj soni,160050092,Jagadeep sai,160050104,Suseendran Baskaran,160050104
Izanagi,Sai Tarun Inaganti,160050103,Nikhil Samrat Gunda,160050088,Jeevithiesh Duggani,160050101
Innovative pals,Aryan,160050053,Sushant Tarun,160050055,Tanmaya Shekhawat,160050051
The Bro-Code,Sushil Khyalia,160050035,Kartik Khandelwal,160070025,Syamantak Kumar,16D070025
3 Idiots,Sahil Shah,160050005,Preey Shah,160050008,Aman Bansal,160050028
Team Ragnarok,Rahul Chunduru,160050072,Pavan Bhargav,160050076,Sai Ganesh,160050078
Team eNRGy,Gurparkash Singh,160050112,Rajat Rathi,160050015,Nikhil Tummidi,160050096
Three idiots,Rama Mahidhar Reddy Kancharla,160050091,Shantanu Kumar,160050069,Sai Praneeeth Reddy Sunkesula,160050100
TheCodeFathers,Shreyash Meena,160050058,Sharvik Mittal,160050059,Ankit Goyal,160050046
The Brogrammers,Sathvik Reddy Kollu,160050077,Saiteja Talluri,160050098,Saiteja Nangunoori,160050089
Code && Seek,Yaswanth Kumar Orru,160050066,Lakshmi Narayana Chappidi,160050080,Manoj Middepogu,160050075
Code Budgies,Mude Chaitanya Naik,160050102,Sunchu Rohit,160050097,Abhishek Akkabathula,160050074
Epsilon-Delta,Nitish Joshi,160070017,Adwait Godbole,160070021,Rishabh Raj,160050029
CodeMAFIA,Kunal Goyal,160050026,Aman Jain,160050034,Eashan Gupta,160050045
Ransomware,Anshu Ahirwar,150050077,Deepesh Meena,150050041,Ashish Chandra,05D05016
Leo,Mayank Singhal,160050039,Yash Gupta,160050037,Piyush Onkar,160050012
zen_coders,Utkarsh Gupta,160050032,R Sudarsanan,160050067,Shubham Gupta,160050061
codekars,Ashish Mittal,160050022,Rupesh,160050042,Debanjan Mondal,160050071
Eclipse,Satti Vamsi Krishna Reddy,160050064,Vighnesh Reddy Konda,160050090,Naman Jain,160050025
Contour,Saurav Kumar,160050057,Saunack Kumar,160050056,Yash Shah,160050002
Code-Catalyst,Sai Charith,160050083,Sanchit Jain,160050043,Attarv,160050004
webpandas,Shourya Pandey,160050013,Sriram Balasubramaniam,160070012,Nilay Pande,160070013
Aurora,Shubham Anand,160050060,Aman Jain,160050019,Ashutosh Kumar Verma,160050063
Hackslash,Tanmayee Kondeti,160050093,Gayatri Konkatwar,160050007,Suraj Bishnoi,160050023
Falcon,Aditya Jadhav,160050010,Akshay Patiday,160050050,Dhruv Jaglan,160050106
Hakunamatata,Rajat majoka,160050031,Prateek,160050110,Simranpreet singh,160050111
Wizards,Ritesh Goenka,160050047,Gaurav Didwania,160050020,Aditya Kumar Mahto,160050094
Codex,Vikrant Garg,160050033,Rohit Choudhary,160050030,Sahil Saiyad,160050021
Red Coders,Amey Patil,160050006,Vinod Shekokar,160050016,Abhro Bhuniya,160050017
HuffleClaw,Harsh Siloiya,160050011,Onkar Piyush Pradeep,160050012,Anirudh Arputham ,160010056
CodeGeeks,Rao Pranav Vasudeva,160100021,Deep Karkhanis,160100024,Sriram Yenamandra,16D070017
Marauders,Maitrey Gramopadhye,160050049,Bhavesh Dhingra,160050108,Sourabh Tote,160050009
sudoofus,Chinmay Awale,160050014,Harshwardhan Mourya,160050048,Rohan Garg,160050018
Tech Knights,Mayanka Medhe,160050027,Chanchal Godara,160050038,Sumit Chaturvedi,160110098
SYNTAX,E.Praneeth,160050073,Bhaviripudi Avinash,160050082,V.Varun Kumar,160050084
Void Walkers,Meet Kathiriya,160050001,Shreyas Pimpalgaonkar,160050024,Phuntsog Wangchuk,160050109
#!/bin/bash
inp=$(cat $1 | sort)
dirpath=$(dirname ${1})
num=$(wc -l $1)
i=0
while [ $i -le $(echo $num | cut -d' ' -f 1) ]
do
var=$(cat $1 | sort | cut -d'
' -f $(expr 1 + $i))
wordcount=$(echo $var | wc -w)
if [ $(echo $wordcount | cut -d' ' -f 1) -gt 0 ]
then
team=$(echo $var | cut -d',' -f 1)
st1=$(echo $var | cut -d',' -f 2)
st2=$(echo $var | cut -d',' -f 4)
st3=$(echo $var | cut -d',' -f 6)
roll1=$(echo $var | cut -d',' -f 3)
roll2=$(echo $var | cut -d',' -f 5)
roll3=$(echo $var | cut -d',' -f 7)
echo $team,$st1,$roll1 >> $dirpath/output
echo $team,$st2,$roll2 >> $dirpath/output
echo $team,$st3,$roll3 >> $dirpath/output
fi
((i++))
done
\ No newline at end of file
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for example
alias weather="
wget -q -O- "https://www.accuweather.com/en/in/mumbai/204842/weather-forecast/204842" | awk -F\' '/acm_RecentLocationsCarousel\.push/' | grep -m 1 ';'
"
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
May I have your attention please?
May I have your attention please?
Will the real Slim Shady please stand up?
I repeat will the real Slim Shady please stand up?
We're going to have a problem here
Y'all act like you never seen a white person before
Jaws all on the floor like Pam and Tommy just burst in the door
Started whoopin' her ass worse than before, they first get divorced
Throwing her over furniture
It's the return of the "Oh wait, no way, your kidding,
He didn't just say what I think he did, did he?"
And Dr Dre said
Nothing you idiots Dr Dre's dead, he's locked in my basement (ha ha)
Feminist women love Eminem, chicka chicka chicka Slim Shady I'm sick of him
Look at him, walking around grabbing his you know what
Flippin' the you know who "yeah, but he's so cute though"
Yea I probably got a couple of screws up in my head loose
But no worse than what's going on in your parent's bedrooms
Sometimes I want to get on TV and just let loose, but can't,
But it's cool for Tom Green to hump a dead moose
My bum is on your lips, my bum is on your lips
And if I'm lucky you might just give it a little kiss
And that's the message that we deliver to little kids
And expect them not to know what a women's clitoris is.
Of course they gonna know what intercourse is, by the time they hit 4th grade,
They got the discovery channel don't they?
We ain't nothing but mammals,
Well some of us cannibals, who cut other people open like cantaloupes.
But if we can hump dead animals and antelopes
Then there's no reason that a man and another man can't elope
But if you feel like I feel I got the antidote.
Women wave your pantyhose, sing the chorus and it goes
I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
'Cause I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
Will Smith don't gotta cuss in his raps to sell records
Well I do, so fuck him and fuck you too.
You think I give a damn about a Grammy?
Half of you critics can't even stomach me, let alone stand me.
"But Slim what if you win wouldn't it be weird?"
Why? So you guys can just lie to get me here?
So you can sit me here next to Britney Spears.
Shit, Christina Aguilera better switch me chairs
So I can sit next to Carson Daly and Fred Durst
And hear 'em argue over who she gave head to first.
Little bitch put me on blast on M-T-V
"Yeah he's cute but I think he's married to Kim, he he"
I should download her audio on mp3
And show the whole world how you gave Eminem V.D.
I'm sick of you little girl and boy groups all you do is annoy me
So I've been sent here to destroy you
And there's a million of us just like me
Who cuss like me, who just don't give a fuck like me, who dress like me
Walk, talk and act like me, it just might be the next best thing,
But not quite me
'Cause I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
'Cause I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
I'm like a head trip to listen to
'Cause I'm only giving you, things you joke about with your friends
Inside your living room
The only difference is I got the balls to say it in front of y'all
And I don't gotta be false or sugar coat it at all
I just get on the mic and spit it, and whether you like to admit it (rip)
I just shit it better than 90 percent of you rappers out there
Then you wonder how can kids eat up these albums like Valiums, it's funny
'Cause at the rate I'm going when I'm thirty
I'll be the only person in the nursing home flirting.
Pinching nurses asses when I'm jackin' off with Jergens
And I'm jerking, but this whole bag of Viagra isn't working
And every single person is a Slim Shady lurkin' he could be workin' at Burger King
Spitten on your onion rings
Or in the parking lot circling,
Screaming I don't give a fuck with his windows down and system up
So will the real Shady, please stand up
And put one of those fingers on each hand up
And to be proud to be outta your mind and outta control
And one more time, loud as you can, how does it go?
I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
'Cause I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
'Cause I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
'Cause I'm Slim Shady, yes I'm the real Shady
All you other Slim Shadys are just imitating
So won't the real Slim Shady, please stand up,
Please stand up,
Please stand up
Haha, I guess there's a Slim Shady in all of us,
Fuck it,
Let's all stand up
#!/bin/bash
dirpath=$(dirname ${1})
cat $1 > $dirpath/output
cuss=$(cat $2)
n=$(echo $cuss | wc -w)
while [ 0 -lt $n ]
do
var=$(echo $cuss | cut -d' ' -f $n)
sed "s/\b$var\b/bleep/Ig" $dirpath/output > $dirpath/temp
cat $dirpath/temp > $dirpath/output
((n--))
done
rm $dirpath/temp
\ No newline at end of file
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