Skip to content

Commit

Permalink
Merge pull request #1 from Madhuparna04/master
Browse files Browse the repository at this point in the history
Asignment1 added
  • Loading branch information
Priiyam authored May 13, 2018
2 parents 5ea64c5 + b9365fc commit 27e415d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Introduction-to-Data-Science/Week-1/Madhuparna/Assignment1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
lines=$( < "file.txt" wc -l)
STAR=$(head -3 file.txt|grep "the"| wc -l)
q=$(expr "$lines" - "3")
DIAMOND=$(tail -$q file.txt| grep "for"| wc -l)
COST=$(expr "$STAR" \* "$STAR")
COST=$(expr "$COST" + "$DIAMOND")
sed -i -e '1,3s/the/it/g' file.txt
sed -i -e '4,$s/for/when/g' file.txt
sort -r file.txt
echo "$COST"

0 comments on commit 27e415d

Please sign in to comment.