10-17-2012
I favor the use of the single quote for fastest and most certain processing, as it expands nothing. You can switch to double wuotes where you want expansion or a literal single quote, and then go back to single quoting. Since there is no expansion, there is less processing. For file wild card expansion, or globbing, you need to be outside quotes. I rather like a pipe: "echo '....' | command" over a here file: "command <<EOD
....
EOD" as I can predict and view expansions easily.
The eval I save for odd situations, like constructing a variable name from a varible and then fetching it. It is a shell built-in, so probably faster than `sh -c 'echo $x'"$m"`
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
If I want to do high-end 3d animation, what skell scripting languages, and programming languages shoul I learn?
If you know any good resources for learning these languages they would be appreciated. (1 Reply)
Discussion started by: aloysius1001
1 Replies
2. UNIX for Advanced & Expert Users
I have never programmed in Perl (insert laughter, mock, etc. here ____) - so I need a sort of "Programming in Perl" covering the basics.
I now have two Perl books, one is a 5 volume Unix resource kit, the other is "Mastering algorithms with Perl" - none of them explains how to produce "hello,... (11 Replies)
Discussion started by: AtleRamsli
11 Replies
3. News, Links, Events and Announcements
Check the essays out.
http://www.paulgraham.com (0 Replies)
Discussion started by: photon
0 Replies
4. What is on Your Mind?
Can someone suggest any online venues to assist in recruiting a senior C programmer (looking for someone interested in working on kerberos code).
I've tried a bunch of the open source and higher ed lists (this is for Univ. of Michigan). The commercial services such as Dice or monster yield a... (7 Replies)
Discussion started by: painman
7 Replies
5. What is on Your Mind?
Post what languages (including scripting) you know, why and where you think that language is most usable. Also include libraries in which you're really good at (libusb, gtk, qt, etc).
assembly?
C or C++?
perl or python?
pascal?
bash or csh/tcsh?
opengl?
gtk or qt?
mono? (27 Replies)
Discussion started by: redoubtable
27 Replies
6. Shell Programming and Scripting
value of i = solarisbox
ssh $i "cat /etc/hosts | sed "s/$i\.local\.//" | sed "s/$i\./$i/" | sed "s/$i/$i.sol.com/" > /usr/users/chidori/edit_hosts"While running the above one liner its i am not able to make the changes and write it to the file /usr/users/chidori/edit_hosts . I know there is a... (2 Replies)
Discussion started by: chidori
2 Replies
7. Programming
i have MOTIF installed X11
a easy program is saved as hello.c
there is the following message
where can i get the X11/intrinsic.h , file ???
need help to compile
my system : MX-16 Linux Debian Jessie / i386
hans@mx1:~/Documents
$ cc push.c -o push -lXm -lXt -lX11
In file included from... (0 Replies)
Discussion started by: Zabo
0 Replies
8. Forum Support Area for Unregistered Users & Account Problems
When I visit Programmers forum my ESET Nod32 detects TrojanDownloader.Pegel.BH.trojan
I don't know when it started, as I visited the site today after staying off-line a few days. (2 Replies)
Discussion started by: migurus
2 Replies
9. What is on Your Mind?
While working on my current "UNIX history project" I ran across this:
Jerry Saltzer created an online scanned copy of the Multics Systems Programmers' Manual (MSPM) in this directory.
Based on the 1969-04-01 MSPM, the repo comprising 996 PDF files.
In order to help preserver the MSPM, ... (1 Reply)
Discussion started by: Neo
1 Replies
10. What is on Your Mind?
Hi guys and gals...
A mildly humourous blog from 2013, but I come into this category... ;oDD
Languager: The Poorest Computer Users are Programmers (0 Replies)
Discussion started by: wisecracker
0 Replies
LEARN ABOUT OSX
page_util_quote
page_util_quote(n) Parser generator tools page_util_quote(n)
__________________________________________________________________________________________________________________________________________________
NAME
page_util_quote - page character quoting utilities
SYNOPSIS
package require page::util::quote ?0.1?
package require snit
::page::util::quote::unquote char
::page::util::quote::quote'tcl char
::page::util::quote::quote'tclstr char
::page::util::quote::quote'tclcom char
_________________________________________________________________
DESCRIPTION
This package provides a few utility commands to convert characters into various forms.
API
::page::util::quote::unquote char
A character, as stored in an abstract syntax tree by a PEG processor (See the packages grammar::peg::interpreter, grammar::me, and
their relations), i.e. in some quoted form, is converted into the equivalent Tcl character. The character is returned as the result
of the command.
::page::util::quote::quote'tcl char
This command takes a Tcl character (internal representation) and converts it into a string which is accepted by the Tcl parser, will
regenerate the character in question and is 7bit ASCII. The string is returned as the result of this command.
::page::util::quote::quote'tclstr char
This command takes a Tcl character (internal representation) and converts it into a string which is accepted by the Tcl parser and
will generate a human readable representation of the character in question. The string is returned as the result of this command.
The string does not use any unprintable characters. It may use backslash-quoting. High UTF characters are quoted to avoid problems
with the still prevalent ascii terminals. It is assumed that the string will be used in a double-quoted environment.
::page::util::quote::quote'tclcom char
This command takes a Tcl character (internal representation) and converts it into a string which is accepted by the Tcl parser when
used within a Tcl comment. The string is returned as the result of this command.
BUGS, IDEAS, FEEDBACK
This document, will undoubtedly contain bugs and other problems. Please report such in the category page of the Tcllib SF Trackers
[http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have.
KEYWORDS
page, parser generator, quoting, text processing
CATEGORY
Page Parser Generator
COPYRIGHT
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>
page 1.0 page_util_quote(n)