we have the following file:
more /tmp/file
Allow,Deny
Allow,Deny
we want to change only the second match word ( to replace Allow,Deny with Deny,Allow )
so we did
sed 's/Allow,Deny/Deny,Allow/1' /tmp/file
Deny,Allow
Deny,Allow
but it replace both them
while the expected results:
Allow,Deny
Deny,Allow
how to replace only the second ,match word