unix script to find which process runs under which node.. - Printable Version +- nixers (https://nixers.net) +-- Forum: Development & Graphics (https://nixers.net/Forum-Development-Graphics) +--- Forum: Programming On Unix (https://nixers.net/Forum-Programming-On-Unix) +--- Thread: unix script to find which process runs under which node.. (/Thread-unix-script-to-find-which-process-runs-under-which-node) |
unix script to find which process runs under which node.. - suneelanz - 29-08-2013 this is the unix script which i tried ----- #!/bin/ksh Cnt=`cat /users/hadoop/unixtest/nodefilename.txt | wc -l` cd /users/hadoop/unixtest/ ls -ltr | awk '{print $9}' > list_of_scripts.txt split -l $Cnt list_of_scripts.txt node_scripts ls -ltr node_scripts* | awk '{print $9}' > list_of_node_scripts.txt for i in nodefilename.txt do for j in list_of_node_scripts.txt do node=$i script_file=$j cat $node\n $script_file >> $script_file done done exit 0; ----- but my result should look like below: node1 node2 ----- ------- process1 proces3 process2 proces4 can some one please help in this.. thanks in advance.. can someone please help me asap.. can someone please help me asap.. |