summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnocompile/bin/grepurl4
-rw-r--r--src/bin/cuturl.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/nocompile/bin/grepurl b/nocompile/bin/grepurl
new file mode 100755
index 0000000..50dc516
--- /dev/null
+++ b/nocompile/bin/grepurl
@@ -0,0 +1,4 @@
+#!/bin/sh
+while read URL;do
+ printf "%s" "$URL" | cuturl "$1" | grep "$2" >/dev/null && echo $URL
+done
diff --git a/src/bin/cuturl.c b/src/bin/cuturl.c
index 40b7766..7451a27 100644
--- a/src/bin/cuturl.c
+++ b/src/bin/cuturl.c
@@ -58,9 +58,9 @@ int main(int argc,char *argv[]) {
printf("To set default values use environment variables like: CUTURL_[OPTION]\n");
return 2;
}
- argc--;
- argv++;
}
+ argv++;
+ argc--;
while(1) {
scheme=0;
username=0;