|By Martin C. Brown||
|June 15, 2004 12:00 AM EDT||
In this installment of the Book Rookery, Martin C. Brown speaks with Dave Taylor, author of Wicked Cool Shell Scripts, about all the fun things you can do with shell scripts, whether you're running Linux, Mac OS X, or even a mainstream Unix system.
Can you tell us more about the book and what's inside?For years I've picked up different programming books and lamented that they weren't fun or interesting. In the shell scripting world, it's even worse, with book after book talking about how to use an "if" statement, but none containing fun, hip, edgy, and even kind of wacky shell scripts that demonstrate all sorts of useful constructs and capabilities, but focus on being interesting. That's exactly what I've done with my book, though. I skip all the how-to and instructional material - after all, there's tons of stuff online nowadays anyway - and jump straight into the content, into listing and explaining 101 different, fun, and useful shell scripts.
What's your favorite script in the book?Well, I had the most fun figuring out how to get the hangman game (#100) to work in as few lines as possible. A flashback to my early programming life when "toss in more RAM" wasn't the solution to a bloated app! In terms of scripts I use every day, the Mac OS X "titleterm" script (#96) is just part of my everyday activity, and I really like the concepts embodied in the bestcompress script (#38) too.
What's the biggest challenge about using shell scripts?At the end of the day, shell scripts can only be so sophisticated. My rule of thumb is that if the script is growing to be more than 200 lines or so, it's probably time to migrate to a more sophisticated programming environment. For me, it's just about always a switch into C, but I'm an old-time Unix guy so C is second nature to me.
Shell scripts? Why wouldn't people use Perl?Perl is a viable option, but what I think is really great about shell scripts is that everyone who uses Unix, Linux, or the terminal in Mac OS X already has 90% of the skills and expertise needed to begin creating their own shell scripts. Further, every line you type into a shell script can be easily tested at a command line, so I'll often start out a script by building a longer and longer pipe of commands, then eventually just copy and paste the entire command sequence into a file and poof a new script is born.
There are lots of different Unix-related books - including a number that you've written - and shell script books. Why another one?Yes, I admit, I've written Teach Yourself Unix in 24 Hours, Teach Yourself Unix System Administration in 24 Hours, and Unix: Man or Beast?. No, wait. Only the first two titles. Sorry.
More seriously, there are lots of books on Unix and Unix-related topics, but they almost all focus on being either dry reference works (five lines and a table of flags for all 1,600 commands included with your OS, yawn) or on step-by-step tutorials (both of my books fall into this category, the "12,158 simple steps to becoming a Unix expert" style), but there are way too few books that are fun and entertaining, choosing to teach through example and through sheer enthusiasm for the environment. Wicked Cool Shell Scripts endeavors to fill this gap and so far, based on the tremendous response from the Unix and open source community, it's hitting its mark.
What's your take on the SCO lawsuit?I've always wondered about people who put more energy into dragging innovators back to the status quo than in innovating themselves, and I think that's exactly what the SCO team is doing. Last I checked, they weren't doing anything interesting or innovative with Unix, so why would they want to slow the rest of us down? I won't go into conspiracy theories, but there sure are a lot of curious coincidences in this situation. Ultimately, though, I'd like to see the open source community cut SCO off at the knees: work with legal people to identify exactly what code SCO believes is questionable and then have swarms of programmers en masse toss that code out of the Linux code base and rewrite all of it "black box" so that SCO is left holding... nothing.
And in the meantime, innovative work with GNOME, the new kernel, autodiscovery of network resources, further levels of compatibility with samba, and other innovations are the lifeblood of our community, and they're what I'd like to see everyone continue to focus on developing.
Your book also covers Mac OS X: What OS do you run on your main computer, and how Unix-y do you think Mac OS X really is, when compared to a distro like Fedora?I have always been a huge fan of Macs, I have to admit. I remember many, many years ago when I first used a 512K Mac (which was loaned to me by the Whole Earth ‘Lectronic Link, of all groups) and realized that it was a whole new way of looking at usability. This was after years of HP's Windex and X (and I remember when Motif was state of the art, gawd!), but it was so clearly superior... I've been a die-hard Mac person ever since and now I have four Macs in my office, including a brand-new dual G5 system. They not only run Mac OS X but my Terminal window is always open too. It's a fabulous pairing of all the power and capabilities of Unix with the GUI and graphical good karma of Aqua, the Mac OS X graphical environment. It rocks!
And finally, what editor do you like, emacs or vi?Oh boy. I'm a "vi" person and have been forever. Thank you Bill for your work in this area, even if it was oh, so many years ago. However, kudos to the vim team too: vim finally fixes all the annoying limitations of vi.
About the Author
Dave Taylor is author of 15 computer books, including Learning Unix for Mac OS X Panther and Creating Cool Web Sites. You can learn more about Wicked Cool Shell Scripts - and read through the scripts - online at www.intuitive.com/wicked.
All major researchers estimate there will be tens of billions devices - computers, smartphones, tablets, and sensors - connected to the Internet by 2020. This number will continue to grow at a rapid pace for the next several decades. With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo, November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be.
Sep. 3, 2015 08:30 PM EDT Reads: 137
Containers are not new, but renewed commitments to performance, flexibility, and agility have propelled them to the top of the agenda today. By working without the need for virtualization and its overhead, containers are seen as the perfect way to deploy apps and services across multiple clouds. Containers can handle anything from file types to operating systems and services, including microservices. What are microservices? Unlike what the name implies, microservices are not necessarily small, but are focused on specific tasks. The ability for developers to deploy multiple containers – thous...
Sep. 3, 2015 08:00 PM EDT Reads: 161
Too often with compelling new technologies market participants become overly enamored with that attractiveness of the technology and neglect underlying business drivers. This tendency, what some call the “newest shiny object syndrome,” is understandable given that virtually all of us are heavily engaged in technology. But it is also mistaken. Without concrete business cases driving its deployment, IoT, like many other technologies before it, will fade into obscurity.
Sep. 3, 2015 04:30 PM EDT Reads: 429
The 3rd International WebRTC Summit, to be held Nov. 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA, announces that its Call for Papers is now open. Topics include all aspects of improving IT delivery by eliminating waste through automated business models leveraging cloud technologies. WebRTC Summit is co-located with 15th International Cloud Expo, 6th International Big Data Expo, 3rd International DevOps Summit and 2nd Internet of @ThingsExpo. WebRTC (Web-based Real-Time Communication) is an open source project supported by Google, Mozilla and Opera that aims to enable bro...
Sep. 3, 2015 03:00 PM EDT Reads: 1,605
As more and more data is generated from a variety of connected devices, the need to get insights from this data and predict future behavior and trends is increasingly essential for businesses. Real-time stream processing is needed in a variety of different industries such as Manufacturing, Oil and Gas, Automobile, Finance, Online Retail, Smart Grids, and Healthcare. Azure Stream Analytics is a fully managed distributed stream computation service that provides low latency, scalable processing of streaming data in the cloud with an enterprise grade SLA. It features built-in integration with Azur...
Sep. 3, 2015 02:45 PM EDT Reads: 387
With the proliferation of connected devices underpinning new Internet of Things systems, Brandon Schulz, Director of Luxoft IoT – Retail, will be looking at the transformation of the retail customer experience in brick and mortar stores in his session at @ThingsExpo. Questions he will address include: Will beacons drop to the wayside like QR codes, or be a proximity-based profit driver? How will the customer experience change in stores of all types when everything can be instrumented and analyzed? As an area of investment, how might a retail company move towards an innovation methodolo...
Sep. 3, 2015 02:30 PM EDT Reads: 512
SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.
Sep. 3, 2015 02:30 PM EDT Reads: 963
SYS-CON Events announced today the Containers & Microservices Bootcamp, being held November 3-4, 2015, in conjunction with 17th Cloud Expo, @ThingsExpo, and @DevOpsSummit at the Santa Clara Convention Center in Santa Clara, CA. This is your chance to get started with the latest technology in the industry. Combined with real-world scenarios and use cases, the Containers and Microservices Bootcamp, led by Janakiram MSV, a Microsoft Regional Director, will include presentations as well as hands-on demos and comprehensive walkthroughs.
Sep. 3, 2015 02:15 PM EDT Reads: 415
Contrary to mainstream media attention, the multiple possibilities of how consumer IoT will transform our everyday lives aren’t the only angle of this headline-gaining trend. There’s a huge opportunity for “industrial IoT” and “Smart Cities” to impact the world in the same capacity – especially during critical situations. For example, a community water dam that needs to release water can leverage embedded critical communications logic to alert the appropriate individuals, on the right device, as soon as they are needed to take action.
Sep. 3, 2015 01:30 PM EDT
WebRTC services have already permeated corporate communications in the form of videoconferencing solutions. However, WebRTC has the potential of going beyond and catalyzing a new class of services providing more than calls with capabilities such as mass-scale real-time media broadcasting, enriched and augmented video, person-to-machine and machine-to-machine communications. In his session at @ThingsExpo, Luis Lopez, CEO of Kurento, will introduce the technologies required for implementing these ideas and some early experiments performed in the Kurento open source software community in areas ...
Sep. 3, 2015 01:15 PM EDT Reads: 106
SYS-CON Events announced today that Pythian, a global IT services company specializing in helping companies leverage disruptive technologies to optimize revenue-generating systems, has been named “Bronze Sponsor” of SYS-CON's 17th Cloud Expo, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Founded in 1997, Pythian is a global IT services company that helps companies compete by adopting disruptive technologies such as cloud, Big Data, advanced analytics, and DevOps to advance innovation and increase agility. Specializing in designing, imple...
Sep. 3, 2015 01:00 PM EDT Reads: 367
Consumer IoT applications provide data about the user that just doesn’t exist in traditional PC or mobile web applications. This rich data, or “context,” enables the highly personalized consumer experiences that characterize many consumer IoT apps. This same data is also providing brands with unprecedented insight into how their connected products are being used, while, at the same time, powering highly targeted engagement and marketing opportunities. In his session at @ThingsExpo, Nathan Treloar, President and COO of Bebaio, will explore examples of brands transforming their businesses by t...
Sep. 3, 2015 12:30 PM EDT Reads: 286
In his session at @ThingsExpo, Lee Williams, a producer of the first smartphones and tablets, will talk about how he is now applying his experience in mobile technology to the design and development of the next generation of Environmental and Sustainability Services at ETwater. He will explain how M2M controllers work through wirelessly connected remote controls; and specifically delve into a retrofit option that reverse-engineers control codes of existing conventional controller systems so they don't have to be replaced and are instantly converted to become smart, connected devices.
Sep. 3, 2015 12:00 PM EDT Reads: 255
With the Apple Watch making its way onto wrists all over the world, it’s only a matter of time before it becomes a staple in the workplace. In fact, Forrester reported that 68 percent of technology and business decision-makers characterize wearables as a top priority for 2015. Recognizing their business value early on, FinancialForce.com was the first to bring ERP to wearables, helping streamline communication across front and back office functions. In his session at @ThingsExpo, Kevin Roberts, GM of Platform at FinancialForce.com, will discuss the value of business applications on wearable ...
Sep. 3, 2015 10:45 AM EDT
SYS-CON Events announced today that Micron Technology, Inc., a global leader in advanced semiconductor systems, will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Micron’s broad portfolio of high-performance memory technologies – including DRAM, NAND and NOR Flash – is the basis for solid state drives, modules, multichip packages and other system solutions. Backed by more than 35 years of technology leadership, Micron's memory solutions enable the world's most innovative computing, consumer,...
Sep. 3, 2015 10:00 AM EDT Reads: 285
17th Cloud Expo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
Sep. 3, 2015 10:00 AM EDT Reads: 1,603
As more intelligent IoT applications shift into gear, they’re merging into the ever-increasing traffic flow of the Internet. It won’t be long before we experience bottlenecks, as IoT traffic peaks during rush hours. Organizations that are unprepared will find themselves by the side of the road unable to cross back into the fast lane. As billions of new devices begin to communicate and exchange data – will your infrastructure be scalable enough to handle this new interconnected world?
Sep. 3, 2015 09:30 AM EDT Reads: 203
While many app developers are comfortable building apps for the smartphone, there is a whole new world out there. In his session at @ThingsExpo, Narayan Sainaney, Co-founder and CTO of Mojio, will discuss how the business case for connected car apps is growing and, with open platform companies having already done the heavy lifting, there really is no barrier to entry.
Sep. 3, 2015 09:30 AM EDT Reads: 213
SYS-CON Events announced today that the "Second Containers & Microservices Expo" will take place November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities.
Sep. 3, 2015 09:30 AM EDT Reads: 651
Manufacturing connected IoT versions of traditional products requires more than multiple deep technology skills. It also requires a shift in mindset, to realize that connected, sensor-enabled “things” act more like services than what we usually think of as products. In his session at @ThingsExpo, David Friedman, CEO and co-founder of Ayla Networks, will discuss how when sensors start generating detailed real-world data about products and how they’re being used, smart manufacturers can use the data to create additional revenue streams, such as improved warranties or premium features. Or slash...
Sep. 3, 2015 09:15 AM EDT