Saving Data In a Text File

Hellllo!

Iconnect my BeagleBone to my windows laptop and i run putty to my BeagleBone cmd which is

root@beaglebone:

after which i retrieve the sensor value using the code which is :

for sensor in /sys/bus/i2c/devices/i2c-1//_input; do echo -n "$(basename $sensor): "; cat $sensor; done

the value I retrieve is

lux1_input: 121
humidity1_input: 58476
temp1_input: 25297
pressure0_input: 99590
temp0_input: 250

How do I save this in a text file on my windows laptop instead?

Regards,
Tiffany

This is a Unix/linux question, not a BBB question. Use redirection to send results to a file.

EXAMPLES:
echo “Hello”
(prints Hello on the console)
echo “Hello” > datafile.txt
(saves Hello to datafile.txt instead of the console)

Craig

Craig,
I think your answer is not precise. This is not a Linux question but a Windows/Putty question.

Possible answers could be:

  1. use copy/paste from the putty window to the file you like
  2. use putty log option.

:slight_smile:

There are tens, if not hundreds of ways to go about this.