Commit 0a66fad4 authored by Darshan Prabhu's avatar Darshan Prabhu

First Commit

parents
#!/bin/sh
a=1
sum=0
temp=0
while [ $a -lt `expr $1 + 1` ]
do
# echo $a
temp=`expr $a \* $a`
sum=`expr $sum + $temp`
a=`expr $a + 1`
done
echo "$sum"
function numDirs {
if [ -d $1 ]; then
ls -lR $1 | grep -v ":$" | grep "^d" | wc -l
else
echo "Directory doesnot exist!"
fi
}
numDirs $1
#!/bin/bash
grep "[5]" q3_in.txt | sort > q3_out.txt
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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