qsreplace (Tomnomnom)
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.
Install from source:
sudo git clone https://github.com/tomnomnom/qsreplace.git
cd qsreplace
sudo go build
sudo mv qsreplace /usr/local/bin
qsreplace --help
###Replace or append values to a given url###
Replace:
cat urls.txt
https://example.com/path?one=1&two=2
cat urls.txt | qsreplace newval
https://example.com/path?one=newval&two=newval
Append:
cat urls.txt | qsreplace -a newval
https://example.com/path?one=1newval&two=2newval
Last updated