how to send referer and url to txtfile using sed
how to send referer and url to txtfile using sed
So i got to make send to textfile work. however it only contains links, i also need the referer.
so how do do that with sed?(linux stream editor)
I made a new topic because i believe this has little relation to my previously started topic.
so how do do that with sed?(linux stream editor)
I made a new topic because i believe this has little relation to my previously started topic.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100628 Linux Mint/9 (Isadora) Firefox/3.6.6
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: how to send referer and url to txtfile using sed
Use a custom support definition like this
Executable:
Command line template:
Where script.sh is something like
Executable:
Code: Select all
/bin/sh
Code: Select all
/path/to/my/script.sh [REFERER] [UFILE]
Code: Select all
#!/bin/sh
REFERER="$1"
URL_FILE="$2"
# ... processing goes here
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Re: how to send referer and url to txtfile using sed
I've got what i've got to do but i don't understand the "#processing goes here" part.Giorgio Maone wrote:Code: Select all
#!/bin/sh REFERER="$1" URL_FILE="$2" # ... processing goes here
what exactly do i put in there? i don't know much about scripting.
although the thing i want to do is make the script output a txt file that contains
Code: Select all
http://www.example.com/referer.html
http://www.example.com/file.file
Code: Select all
referer
http://www.example.com/referer.html
urls
http://www.example.com/file1.file
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100628 Linux Mint/9 (Isadora) Firefox/3.6.6
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: how to send referer and url to txtfile using sed
Sorry, I did not notice you where on Windows.
Just use
Executable:
Command line template:
(omit the trailing "& notepad C:\FlashGot.txt" if you don't want the file to be opened automatically.)
Just use
Executable:
Code: Select all
C:\Windows\System32\cmd.exe
Code: Select all
/C ( echo referer & echo [REFERER] & echo urls & type [UFILE] ) > C:\FlashGot.txt & notepad C:\FlashGot.txt
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Re: how to send referer and url to txtfile using sed
Uh, actually I'm on lxde mint 9. though i dual boot xp but only for windows-only games.Giorgio Maone wrote:Sorry, I did not notice you where on Windows.
so again, kindly explain what should i do here
Code: Select all
#!/bin/sh
REFERER="$1"
URL_FILE="$2"
# ... processing goes here<<<---this part, or rather, what should be written below this
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100628 Linux Mint/9 (Isadora) Firefox/3.6.6
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: how to send referer and url to txtfile using sed
AngraMainyu768 wrote:Uh, actually I'm on lxde mint 9. though i dual boot xp but only for windows-only games.Giorgio Maone wrote:Sorry, I did not notice you where on Windows.
so again, kindly explain what should i do here
Code: Select all
#!/bin/sh
REFERER="$1"
URL_FILE="$2"
# the file you want your output to go into
OUT="$HOME/flashgot-list.txt"
# writes out the file
( echo "referer" && echo "$REFERER" && echo "urls" && cat "$URL_FILE" ) > "$OUT"
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Re: how to send referer and url to txtfile using sed
PERFECT! It works! thanks a lot!Giorgio Maone wrote:AngraMainyu768 wrote:Uh, actually I'm on lxde mint 9. though i dual boot xp but only for windows-only games.Giorgio Maone wrote:Sorry, I did not notice you where on Windows.
so again, kindly explain what should i do hereCode: Select all
#!/bin/sh REFERER="$1" URL_FILE="$2" # the file you want your output to go into OUT="$HOME/flashgot-list.txt" # writes out the file ( echo "referer" && echo "$REFERER" && echo "urls" && cat "$URL_FILE" ) > "$OUT"
by the way. why is this feature(outputting urls, referers and whatnot to a txt file) not included in flashgot by default? seems pretty useful to me.
I'm not requesting it to be included though(after all, this is the support section). i was just wondering why it isn't there out of the box.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100628 Linux Mint/9 (Isadora) Firefox/3.6.6