Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Shell Scripting with Zsh
  • Table Of Contents Toc
Learning Shell Scripting with Zsh

Learning Shell Scripting with Zsh

By : Gaston Festari
2.3 (9)
close
close
Learning Shell Scripting with Zsh

Learning Shell Scripting with Zsh

2.3 (9)
By: Gaston Festari

Overview of this book

A step-by-step tutorial that will teach you, through real-world examples, how to configure and use zsh and its various features. If you are a system administrator, developer, or computer professional involved with UNIX who are looking to improve on their daily tasks involving the UNIX shell, Learning Shell Scripting with zsh will be great for you. It’s assumed that you have some familiarity with an UNIX command-line interface and feel comfortable with editors such as Emacs or vi.
Table of Contents (13 chapters)
close
close

Quoting your strings


A safe way of declaring your string variables involves the usage of quotes. Think of it as a way of telling the function "here starts and over here ends my string". Although not necessary on this particular example, you can quote a phrase when using echo as follows:

% echo 'this is a quoted phrase'
> this is a quoted phrase

Single quotes are treated as delimiters by the shell and as such, they are completely ignored. The same rule applies to the print built-in function:

% print 'this is a quoted phrase'
> this is a quoted phrase

So, what's the point of using quotes then? Well, imagine for a moment that your output looks something like the following:

% echo this is a backslash: \
~>

Yes, that will trigger a continuation line, so there's seemingly no way around it, save for using quotes. Let's try it again:

% echo 'this is a backslash: \'
> this is a backslash: \

So, as a rule of thumb, we use single quotes when there are special characters on our string as...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Shell Scripting with Zsh
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon