Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SpartanBotsAssignment3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roshan Rabinarayan
SpartanBotsAssignment3
Commits
dde40bf9
Commit
dde40bf9
authored
Sep 03, 2020
by
Samarth Joshi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.cse.iitb.ac.in/sroshan/SpartanBotsAssignment3
parents
644c252e
b982499f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
q2/q2.sh
q2/q2.sh
+10
-0
q2/testcase/test.sh
q2/testcase/test.sh
+0
-0
q4/q4.awk
q4/q4.awk
+13
-0
No files found.
q2/q2.sh
View file @
dde40bf9
#!/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
q2/test.sh
→
q2/test
case/test
.sh
View file @
dde40bf9
File moved
q4/q4.awk
View file @
dde40bf9
#! /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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment