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}/&#/' fileInsert '#' in position 15Add nginx repository Ubuntu # 1. Download the NGINX signing key curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /u...