This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
linux:raspberry:wde:scripts:reader [2017/03/01 12:50] – external edit 127.0.0.1 | linux:raspberry:wde:scripts:reader [2017/12/08 20:49] – lunetikk | ||
---|---|---|---|
Line 7: | Line 7: | ||
This will execute socat with daily modified parameters. The logfile parameter will have the date of " | This will execute socat with daily modified parameters. The logfile parameter will have the date of " | ||
- | <code bash wde.sh> | + | wde.sh |
+ | |||
+ | <code bash> | ||
#!/bin/bash | #!/bin/bash | ||
Line 27: | Line 29: | ||
This script will write 1 file with a single outputline, started with the date and time. | This script will write 1 file with a single outputline, started with the date and time. | ||
- | <code bash wde_reader.sh> | + | wde_reader.sh |
+ | |||
+ | <code bash> | ||
#!/bin/bash | #!/bin/bash | ||
Line 39: | Line 43: | ||
BAUD=\, | BAUD=\, | ||
CMD=" | CMD=" | ||
- | |||
while read -r line | while read -r line | ||
do | do | ||
- | echo " | + | echo " |
done < <( $CMD ) | done < <( $CMD ) | ||
</ | </ | ||
Line 51: | Line 54: | ||
This script is killing socat everyday at 11:58 pm. Remember, it will start again at 12:02 am with a new date. | This script is killing socat everyday at 11:58 pm. Remember, it will start again at 12:02 am with a new date. | ||
- | <code bash wdekill.sh> | + | wdekill.sh |
+ | |||
+ | <code bash> | ||
#!/bin/bash | #!/bin/bash | ||
Line 60: | Line 65: | ||
==== Output ==== | ==== Output ==== | ||
- | There will be a new logfile with another date everyday. | + | There will be a new logfile with another date everyday. |
Examplefile 06_05_2015.log: | Examplefile 06_05_2015.log: | ||
+ | |||
< | < | ||
06.05.2015; | 06.05.2015; | ||
Line 73: | Line 79: | ||
</ | </ | ||
- | \\ | ||
\\ | \\ | ||
~~DISCUSSION~~ | ~~DISCUSSION~~ | ||
+ | |||
+ |