0

My server OS is Debian 7. I want to add id say 'xyz' to the below URLs enter image description here

example.com/abc.html?id=White
example.com/abc.html?id=Black 

Then URLs should look like

example.com/abc.html?id=White&trackId=xyz
example.com/abc.html?id=Black&trackId=xyz

In data feed there are lots of URLs and there could be any color mentioned in front of ?id=

I want to add cron job for this, to download the feed and add id to the URLs.

Please help me. Thanks.

Hrishi
  • 67
  • 1
  • 7

1 Answers1

1

Assuming you just want to append trackId=xyz to the end of each URL:

awk '{print $0 "&trackId=xyz"}'  <in.txt  >out.txt
wojtow
  • 163
  • 5