Posts

Showing posts from 2018

List of Statutory Instruments of the United Kingdom, 1973

Image
Part of a series on UK law Acts of Parliament by states preceding the United Kingdom Of the Kingdom of England Before 1485 1485–1601 1603–1641 Interregnum (1642–1660) 1660–1699 1700–1706 Royal statutes, etc. issued before the development of Parliament Of the Kingdom of Ireland Before 1701 1701–1800 Of the Kingdom of Scotland Up to 1707 Of the Kingdom of Great Britain 1707–1719 1720–1739 1740–1759 1760–1779 1780–1800 Acts of Parliament of the United Kingdom 1801–1819  · 1820–1839  · 1840–1859  · 1860–1879  · 1880–1899  · 1900–1919  · 1920–1939  · 1940–1959  · 1960–1979  · 1980–1999  · 2000–present Acts of Parliament relating to the European Union (formally European Communities) 1972–present Delegated legislation Statutory rules and orders United Kingdom 1894–1947 Northern Ireland 1922–1974 United Kingdom statutory instruments 1947  · 1948  · 1949  · 1950 

Find and replace all numbers after a string value and increment each one

Image
0 I am trying to see if I can achieve a find/replace and increment an integer value in a couple of lines. To explain, I have the following text: &sr=1240000000000&type=game&scoreA=x&scoreB=y& &sr=1150000000000&type=game&scoreB=x&scoreB=y& &sr=1270000000000&type=game&scoreC=x&scoreB=y& &sr=1010000000000&type=game&scoreD=x&scoreB=y& I want to replace ONLY the number after sr= till... & so for example as shown in bold: &sr= 1240000000000 &type=game&scoreA=x&scoreB=y& All numbers to be replaced and incremented by 10000 for each subsequent one found... So ideally when I use a script as follows (Taking 2 args, first is value to replace to, and the input file): ./script.sh 1500000000000 file.txt it sh