Skip to main content

Posts

Showing posts with the label parse delimited file bash assign variables

BASH foo

Update a file named after a "system" with the IP address from a ":" delimited text file. system:192.168.0.100 cat list | awk -F\: '{ print $1" "$2 }' | while read SYS IP; do echo "address $IP" >> ${SYS}.cfg ; done - Passing responses in to an install script ( echo NB_CLT_7.5.0.6; echo y; echo q; echo y ) | ./NB_update.install This.. is awesome To get the text between two 'strings'  cat sar11 |  awk '/plist-sz/,/Average/ ' 00:00:01      runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15 00:01:01            2       998      1.14      0.38      0.18 00:02:01            1      1006      2.35      0.91    ...