Insert character at specified position


awk '{$2="#"$2;print $0}' your_file

This will add # to the start of the second (space-separated) column regardless of which position it occurs at.



sed -r -e 's/^.{15}/&#/' file

Insert '#' in position 15

NGINX - To allow a specific User-Agent from one IP address only

Step 1: Define the Map BlocksAdd this configuration inside the http {} block of your /etc/nginx/nginx.conf file. This logic evaluates the in...

Mais vistos