Subscribe: Comments for Anton Olsen.com
http://antonolsen.com/comments/feed/
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
anton olsen  anton  bash split  bash  comment bash  comment read  comment  data  echo  file bash  file  loop  read file  read  split  string 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments for Anton Olsen.com

Comments for Anton Olsen



Just another WordPress site



Last Build Date: Thu, 19 Jun 2014 07:55:39 +0000

 



Comment on BASH: Convert Unix Timestamp to a Date by kiran

Thu, 19 Jun 2014 07:55:39 +0000

not worked for me . we used for scripting purpose it will give onle result. o/p:- perl -MPOSIX=strftime -e print strftime("%Y-%m-%d %T", localtime($lastlog1)), "n" 1970-01-01 00:00:00 i wan to conver gmt regular date formate; Thanks & Regards, Babukiran



Comment on BASH: Split a string without ‘cut’ or ‘awk’ by Anton

Tue, 13 May 2014 03:36:19 +0000

cut works if you can manage to escape all the quotes, double and single. The built in string methods work regardless of quoting.



Comment on About by BeagleBone Black and “Sounds of the Night:” Installment 4 of 7 | Volt Vision

Thu, 01 May 2014 19:03:48 +0000

[…] the raw sensors, resistors and wires thrashing in the wind and snow. Luckily, my GeekDad buddy Anton Olsen, who I met through our trips to Guatemala, recently introduced me to this Vex Robotics Light Sensor […]



Comment on LED Temperature Thermometer Project by Gabrielle

Tue, 29 Apr 2014 14:30:34 +0000

May I know how to connect the trim pot with the pins? I got the circuit diagram but I'm totally confused with the connections and the calibration process, help me please! Thanks for helping~!



Comment on BASH: Split a string without ‘cut’ or ‘awk’ by Wesley Stam

Wed, 09 Apr 2014 09:48:54 +0000

I'm not sure if I understand the problem, however this will split the lines regardless of how many items: 'echo $line | cut -d';' -f1- --output-delimiter=$'n'' '-f1-' will print all items starting with the first one. Notice the dash after f1. ### Output ### this “is” a command this “is” a pattern



Comment on Robot Lawn Mower. by Lance Ramshur

Tue, 18 Feb 2014 19:07:14 +0000

Tim, I looked over your robot and would really like to build one. I know this post is old, but do you by any chance have the schematic to the 10kHz generator? Thanks, Lance



Comment on QNAP Technical Support, or Lack Thereof by Ed

Sun, 04 Aug 2013 20:59:27 +0000

Still a few months later, this type of crappy support still goes on. I bought my unit a year ago and the same issue happened. One ethernet port is dead. i asked for an advance replacement; willing to put a CC to insure the return. Was told I could not do that. I was forced to buy another unit, but this time it was not QNAP. I sent the other back and asked that they use my shipping account to return it to me overnight. Still, unwilling to do even that. Product is good, the support SUCKS!



Comment on The XO Laptop by Nice I Pad Review photos | iPad News Blog

Sun, 28 Jul 2013 11:28:17 +0000

[...] My short review is here: antonolsen.com/2008/03/13/the-xo-laptop/ [...]



Comment on read a file with bash by Anton

Wed, 24 Jul 2013 14:59:35 +0000

First off, I wrote this about 8 years ago, so a lot has changed since then including my level of knowledge. Second, lay off the useless use of cat complaints. It's simply a method of getting data for an example. In reality I would have used something like find, or recursive grep to get the data I needed to act upon. Third, this is just an example of how to loop through a file or pipe. It isn't a definitive list of things you can do inside that loop. I chose echo for simplicity, but in practice it would be whatever command you wished to perform. As for the example: find /tmp -name '*.txt' | while read line; do echo "${line}"; done That's a simple way to ensure that your loop is correct before replacing the echo with some useful command and potentially destroying data.



Comment on read a file with bash by Cody

Thu, 20 Jun 2013 23:09:30 +0000

And as for the trying to correct the example from David. Change the two less than signs to one less than sign and then it should work. (well okay and you'll need a semi-colon before done - accidentally did not type it).