Browse Source

processing cli args

phyto 6 months ago
parent
commit
9c74ad9449
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      plot.sh

+ 7
- 1
plot.sh View File

@@ -2,14 +2,20 @@
2 2
 
3 3
 #           THIS IS A KLUDGE 
4 4
 
5
+nbsamp=3000	# nombre d'echantillon 
6
+
7
+if [ $# -eq 1 ]; then
8
+	nbsamp=$1
9
+fi
5 10
 
6 11
 DATAFILE="serial/foo.dat"
7 12
 IMAGE="graphe.png"
8 13
 TMPFILE="/dev/shm/tmpdata"
9 14
 
15
+echo $nbsamp
10 16
 wc -l ${DATAFILE}
11 17
 
12
-tail -2500 < ${DATAFILE} > ${TMPFILE}
18
+tail -3000 < ${DATAFILE} > ${TMPFILE}
13 19
 
14 20
 gnuplot << __EOC__
15 21
 set term png 	size 1600,800

Loading…
Cancel
Save