Skip to content

Commit

Permalink
Create week1_assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
PShivani07 authored May 13, 2018
1 parent 27e415d commit 4ea4843
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ShivaniP/week1_assignment
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
echo "input file content:"
cat $1
line=$(wc -l $1)
star=$(head -3 $1|grep the |wc -l)
diamond=$(tail -n+4 $1|grep for |wc -l)
cost=$(( $star*$star + $diamond ))
echo "output"
a=$(head -3 $1|sed 's/the/it/')
b=$(tail -n+4 $1|sed 's/for/when/')
echo -e "$a\n$b"|sort -r
echo "cost=$cost"

0 comments on commit 4ea4843

Please sign in to comment.