Skip to content

Commit 303be91

Browse files
committed
Merge pull request tariqbuilds#200 from jasonwbarnett/cleaner-and-easier-to-read-df
df - Added OFS to the awk command for simplicity and clarity sake.
2 parents 37015f1 + 378802d commit 303be91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sh/df.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
exec('/bin/df -Ph|awk \'{print $1","$2","$3","$4","$5","$6}\'', $result);
3+
exec('/bin/df -Ph | awk \'BEGIN {OFS=","} {print $1,$2,$3,$4,$5,$6}\'', $result);
44

55
header('Content-Type: application/json; charset=UTF-8');
66
echo "[";

0 commit comments

Comments
 (0)