mirror of
				https://github.com/ShaYmez/ezservermonitor-web.git
				synced 2025-11-03 13:30:39 -05:00 
			
		
		
		
	fix the awk command
This commit is contained in:
		
							parent
							
								
									3aa15d98a9
								
							
						
					
					
						commit
						52a34fd25b
					
				@ -6,7 +6,7 @@ $datas = array();
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# if there are more than 7 awk's colums it means the mount point name contains spaces
 | 
					# if there are more than 7 awk's colums it means the mount point name contains spaces
 | 
				
			||||||
# so consider the first colums as a unique colum and the last 6 as real colums
 | 
					# so consider the first colums as a unique colum and the last 6 as real colums
 | 
				
			||||||
if (!(exec('/bin/df -T -P | tail -n +2 | awk \'{ if (NF > 7) { for (i=1; i<NF-6; i++) { printf $i" "; } for (i=NF-6; i<NF; i++) { printf $i","; print $NF; } } else { print $1","$2","$3","$4","$5","$6","$7; } }\'', $df)))
 | 
					if (!(exec('/bin/df -T -P | tail -n +2 | awk \'{ if (NF > 7) { for (i=1; i<NF-6; i++) { printf $i" "; } for (i=NF-6; i<NF; i++) { printf $i","; } print $NF; } else { print $1","$2","$3","$4","$5","$6","$7; } }\'', $df)))
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    $datas[] = array(
 | 
					    $datas[] = array(
 | 
				
			||||||
        'total'         => 'N.A',
 | 
					        'total'         => 'N.A',
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user