Tony Mountifield <t...@mountifield.org> wrote:

>> # Get the file
>> Utmp=$( < /home/pi/net/devices.csv )
>> 
>> # Get everything after the 12th ','
>> Utmp=$(Utmp#*,*,*,*,*,*,*,*,*,*,*,*,)
> 
> Always dangerous to type suggestions on the fly without testing!
> (been there, done that)
> 
> I think you mean ${ ... } not $( ... ), and similarly on the next two.

Just testing to see if anyone is paying attention ;-)

Yes, some of those () should be {}. The first line is correct using the $(...) 
to run a command in a sub-shell. After that it should be ${...} for value 
substitution.

Every code example should have at least one error - it teaches more is someone 
has to work out what's wrong and fix it :D


As an aside, it's said that every Meccano instruction leaflet had at least one 
error for that reason. Ie, the kit could not be build by following the 
instructions to the letter (or image as they are pictorial), so the user has to 
apply some thinking for themselves.
Wikipedia says that those involves say they were accidental errors.
https://en.wikipedia.org/wiki/Meccano#Capabilities

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to