8000 GitHub - tomnomnom/qsreplace: Accept URLs on stdin, replace all query string values with a user-supplied value
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tomnomnom/qsreplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qsreplace

Accept URLs on stdin, replace all query string values with a user-supplied value, only output each combination of query string parameters once per host and path.

Usage

Example input file:

▶ cat urls.txt 
https://example.com/path?
https://example.com/path?two=2&
https://example.com/pathtwo?two=2&
https://example.net/a/path?two=2&

Replace Query String Values

▶ cat urls.txt | qsreplace newval
https://example.com/path?
https://example.com/pathtwo?
https://example.net/a/path?

Append to Query String Values

▶ cat urls.txt | qsreplace -a newval
https://example.com/path?
https://example.com/pathtwo?
https://example.net/a/path?

Remove Duplicate URL and Parameter Combinations

You can omit the argument to -a to only output each combination of URL and query string parameters once:

▶ cat urls.txt | qsreplace -a 
https://example.com/path?
https://example.com/pathtwo?
https://example.net/a/path?

Install

With Go:

▶ go install github.com/tomnomnom/qsreplace@latest

Or download a release and put it somewhere in your $PATH (e.g. in /usr/local/bin).

About

Accept URLs on stdin, replace all query string values with a user-supplied value

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0