awk command

create a file with name=users.rsc and contain


add disabled=no download-limit=2147483648 group-name=1  name=reza.mnp password=10 upload-limit=2147483648 uptime-limit=1d6h
add disabled=no download-limit=5368709120 group-name=2  name=20 password=20 upload-limit=5368709120 uptime-limit=2d12h

[code]

awk -F’ ‘ ‘{ print $5,$6 }’ users.rsc > new.rsc

[/code]

output

name=reza.mnp password=10
name=20 password=20

[code]

awk ‘{ print }’ new.rsc

[/code]

output

name=reza.mnp password=10
name=20 password=20

[code]

awk ‘/reza/’ new.rsc

[/code]

output

name=reza.mnp password=10

 

Leave a Reply

Your email address will not be published. Required fields are marked *