|
|
The box arrived from NoStarch Press and ...
Curious about the topic? It's 101 great shell scripts for Unix, Linux and Mac OS X systems, each presented in its entirety with detailed explanations, sample input and output, and suggestions on ways you can hack it to go even further. Scripts range from Apache log file analysis tools to Web site scrapers, Mac OS X account management utilities to a version of the game hangman for your edification.
It's a good book. Check it out!
Related The Writing Business articles:
✔ What's the best option for self-publishing my book?
I have written a book and I want to self-publish, but I am not sure how to choose a self-publishing company. Which self-publishing...
✔ How do I get into online writing?I really want to get into writing online, Dave. Can you offer up some tips and tricks for me to break into this...
✔ How do I recover a lost ISBN book number?I self-published a book in 1983. I would now like to make it an e-book. I do not remember my isbn number. How...
✔ How do you avoid writer's block?I want to get into blogging, but I hear from my friends that it's really hard because after a few weeks you start...
✔ How do I get my first novel published when I'm a kid?I've been searching for some help on this a for about four, five years. I'm 16 years old and I've been writing novels...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help
right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
Categorized:
The Writing Business
(Article 3676,
Written by Dave Taylor)
Tagged: Previous: Including Word files on your Web site Next: Weird Internet Explorer 6 hiccups Reader Comments To Date: 4Dave T. said, on March 19, 2004 11:57 PM:
As you reported to me in email, your problem was that you'd copied the cut statements like this: month="$(echo $newdate | cut -d\ -f1)" The problem is that you need TWO spaces after the backslash. Fix that, and it works fine. :-) Dennis Brunskill said, on April 20, 2004 1:10 PM:
Am very interested in your book after seeing you on the Screen Savers last night (4/19/04). I tried the bestcompress script but it looks like I'm getting incorrect results. I'm running it on a 7767 txt file and it reports compress as the best choice resulting in a compressed file size of 4493. If however I run gzip and bzip2 on the txt file I get file sizes of 3715 and 3559 respectively. So it dosen't appear that compress is the best choice and bestcompress is not comparing the file sizes correctly. ??? Dave Taylor said, on April 25, 2004 11:32 PM:
Thanks for your note, Dennis. You're correct: it turns out that by default the ls command wants to sort filenames alphabetically, which turns out to be a problem with this particular script. The good news is that it's super easy to fix: instead of using "ls -l" in this script use "ls -lf" instead. There's a more detailed explanation on the main page of the booktalk weblog...
I do have a comment, now that you mention it!Check This Out Too... |
Recent Entries
Look for Answers
Recommended
All Our Categories
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and Blogging Building Web Site Traffic Business and Management Computer and Internet Basics d) None of the Above Facebook Help Google Gmail Help Google Plus Help HTML, JavaScript and Web Site Programming Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Kindle Fire Help Mac OS X Help Pay Per Click (PPC) Advertising Pinterest Help Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help Find Me on Google+ ADT on G+ |
In script #7 under MacOS 10.2.8; I get a cut error:
[home:~/scripts] smac% valid-date november 25 1963
usage: cut -c list [file1 ...]
cut -f list [-s] [-d delim] [file ...]
usage: cut -c list [file1 ...]
cut -f list [-s] [-d delim] [file ...]
usage: cut -c list [file1 ...]
cut -f list [-s] [-d delim] [file ...]
valid-date: Unknown month name 25
It appears that its taking the second field for the month,
rather than the first. It fails on every date entered.
I've verified that normdate works properly:
[home:~/scripts] smac% normdate november 25 1963
Nov 25 1963
... and I freely admit that I'm a clueless puppy trying to learn scripting by doing.
Help? :)
smac