|
||||||||||||||||||
Linux bash enigma: ls |wc
June. 19th, 2008 17:59 by sdeluca — Permalink | TrackBack: http://isdlair.com/trackback/835 | While working on an administrative shell script for our mobile location-based social networking service http://m.mobiluck.com I came accross a weird issue. Let me explain what I want first. I am analysing incoming ads hits on our service, data mining the apache log file. I wanted to use a simple script in bash. The point is to display how I grep the file for answering a question, and then display the result of the grep. But as I came accross an issue, I will generalize it with this very simple script:
I was expecting the following results: Unfortunately, I've got the following: Turning on the debug mode I've got the following: It appears that bash add simple quotes where it finds blank spaces. How it comes? Any idea how to fix this? CommentsBe the first to leave a comment. |
||||||||||||||||||
Copyright © 1994 ˜ 2008 dsei.biz / Stéphane de Luca — All Rights Reserved
| 05:56 AM
| RSS Feed
| Best viewed with Safari
|
||||||||||||||||||
|
|
||||||||||||||||||