I'm trying to use following syntax to get output in multipe lines. but its not working..
df -h | awk '{print $1}' > tee -a nss1 nss2 nss3
can any1 please tell me how can i get required output in multiple files.
I also tried this syntax but in that way i get output only in nss2 file.
df -h | awk '{print $1}' > nss1 > nss2
Try:
df -h | awk '{print $1}' | tee -a nss1 nss2 nss3
Yes it works but meanwhile it also prints output on screen which i dont want.
zedex
4
tee is used for printing on terminal and writing to file!!
well i am not sure what it will do but just giving a try ( i dont have terminal in front of me so its WILD guess )
echo "1" | tee -a a.out b.out c.out 1>/dev/null
thanks @zedex. its working.