bash - using shell in awk snippet -


i have problem shell , awk while using them nested. have shell script code prints processes file want read them awk , when find process special condition (for ex: process' start hour 10:00) want copy file. couldn't make it. here code:

#!/bin/sh  processes=` ps aux > processes.txt `  awk 'begin {fs = " ";} {     if (some statement)     {         temp = $0 // want copy line file         " temp >> anotherfile.txt " // here want use "temp" shell veriable couldn't    } } end {}' processes.txt 

can show me hint maybe can figure out something. thanks.

ps aux | awk '$9=="10:00"' >>anotherfile.txt 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -