I have code like below
ProcessBuilder pb = new ProcessBuilder("bash", "-c",
" awk -f awkfile " + " file2 " + file1);
p = pb.start();
p.waitFor();
p.destroy();
pb = new ProcessBuilder("bash", "-c",
" awk -f awkfile " + " file3 " + outFile);
p = pb.start();
p.waitFor();
p.destroy();
pb = new ProcessBuilder("bash", "-c",
" awk -f awkfile " + " file4 " + outFile);
p = pb.start();
p.waitFor();
p.destroy();
awkfile has the contents
FILENAME==ARGV[1] {vals[$1FS$2FS$3] = ",Y"; next}
!($1FS$2FS$3 in vals) {vals[$1FS$2FS$3] = ",N"}
{$(NF+1) = vals[$1FS$2FS$3]; print > "outFile"}
The first ProcessBuilder runs fine.The outFile has complete output (I commented out the remaining code and tested). When I include the second ProcessBuilder or third processbuilder then the outFile is incomplete. Is this a space issue or a memory issue. I do not how to find the total space allocated to my home directory. The du command results are below
du -s /home/xxxxx
19172 /home/xxxxx
the df command results are below
df -k /home/xxxxx
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rootvg-homelv 2064208 193068 1766296 10% /home
Is the available above 1766296 for the entire /home directory or just for my home directory /home/xxxxx
Can you please guide me as to how to get past this issue.
ARGV[0]? Also, I'd recommend parameterizing the intermediate output file names (i.e.ARGV[2]) instead of hardcoding"outFile"in awkfile.