Commit dde40bf9 authored by Samarth Joshi's avatar Samarth Joshi
parents 644c252e b982499f
#!/bin/sh
#converting whitespaces to new line in temp file
sed -e 's/[\t ]\+/\n/g' -e 's/https/\nhttps/g' $1 >temp
#saving all urls
sed -n '/https\:\/\/www\.cse\.iitb\.ac\.in[/][~][^ ]\+/p' temp >url
#removing all urls from inputfile
sed -i -e 's/http[s]\?\:\/\/[^ ]\+/ /g' -e 's/[^ ]\+[.]\(com\|in\|org\|net\|co\|us\|edu\|gov\)[^ ]\?/ /g' $1
sed -i -e 's/[\t ]\+/ /g' $1
rm temp
\ No newline at end of file
#! /usr/bin/awk -f
BEGIN {
marks=0;
}
NR==FNR{corr_ans[$0]++;next}
{
for(row in corr_ans){split(row,arr," ");if(arr[1] == $1){for(num in arr){if((num > 1) && arr[num] == $num){marks++;}}}}
}
END{
print marks;
}
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