Thanks Roger....I did attempt this but the code does the same thing, I do not get the output from df -k formatted in the file get no output to the file spaceavail.txt
Interesting, are you sure? The code I posted has been tested and works for sure. Perhaps you can post your updated code here and let's see which part is not working.