Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- awk -v ip="192.168.0.10" -v usuario="carlos" '{
- Registro[NR]=$0
- IPS[NR]=$3
- USUARIOS[NR]=$8
- } END {
- for (i=1; i<=NR; i++) {
- if (IPS[i]==ip) sub(USUARIOS[i],usuario,Registro[i])
- print Registro[i]
- }
- }' 1.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement