04-13-2011
The variable complaint is from the $ inside ", which wants to be expanded by the shell. Use ' not " as your first choice, unless you want variable expansion and such from the shell. String literals inside ' stay put. If you need to put ' in there, put '"'"' (single-double-single-double-single) to take you out of single and into double, so the second single is your literal, and then out of double and back into single. For variables, just go from single to double right there just for that: 'xxx'"$var_NAME"'yyyy'
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a string which contains following information:
<SZ.T><P ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="+3">Bundesregierung nimmt sich dicke Deutsche vor</FONT></P></SZ.T>
<SZ.UT><P ALIGN="CENTER"><FONT SIZE="+1"><I> Seehofer und Schmidt planen Kampagne gegen... (3 Replies)
Discussion started by: trek
3 Replies
2. Shell Programming and Scripting
I have some files in unix
ls -1
TMH.backend.tar.421E-03.Z
TMH.backend.tar.421E-04.Z
TMH.backend.tar.421E-05.Z
TMH.backend.tar.421E-06.Z
TMH.backend.tar.421E-07.Z
TMH.backend.tar.421E-08.Z
TMH.backend.tar.421E-08.Z.bak20081223164844
TMH.backend.tar.421E-09.Z... (1 Reply)
Discussion started by: on9west
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I need to find out the files whcih contains date in YYYYMMDD in their name.
I don't know if I can use regex in side find.
Now I am using commad for the same purpose which is not full proof.
find . -name "**" -print
But I want then It should contain at lease 8 digit in their... (3 Replies)
Discussion started by: siba.s.nayak
3 Replies
4. Shell Programming and Scripting
Hi There,
Can anybody help me out for searching this regular expression?
xxxxx.yyy.zzzz.From-ABCD.To-XYZ.xxxxxx
I would like the ID1 and ID2 (knowing which one is Id1 and id2)
.From-<ID1>.
and
.To-<ID2>.
Thanks in advance!!
Regards,
Bhaskar (4 Replies)
Discussion started by: bhaskar_m
4 Replies
5. Shell Programming and Scripting
hi ,
how do i remove # from a line where i found regex..
don't need to remove all the line.. only remove comment.. (3 Replies)
Discussion started by: Poki
3 Replies
6. Shell Programming and Scripting
Hello,
I want to check if directories exist with a regex expression
dir1=/temp/local/*/home (exists on file system)
dir2=/temp/server/*/logs (does not exist on file system)
I want to check if there are any directories with the above regex
Code:
if ];then
echo "Directory... (4 Replies)
Discussion started by: gogineni
4 Replies
7. Shell Programming and Scripting
How to do alternation using regular expressions in the 'find' command? Like say you want to find all files that do not match the names specifically "this" or "that" within a directory using regular expressions? (10 Replies)
Discussion started by: stevensw
10 Replies
8. Shell Programming and Scripting
#ls json-*
json-lexer.c json-lexer.h json-parser.c json-parser.h json-streamer.c json-streamer.h
#find . -regex '^(json-)+.'
return nothing (3 Replies)
Discussion started by: yanglei_fage
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
We have to copy some files from a source directory to a destination directory. We only have to copy the file if the filename is in a list of values.
We can use find command:
find . -type f -name '*_111.txt' -o -name '*_115.txt' ... -exec cp {} /tmp \;
But the list contains... (3 Replies)
Discussion started by: bartleby
3 Replies
10. Shell Programming and Scripting
I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works:
LOCAL_CONFIG
#
Kcheckaddress regex -a@MATCH
+<@+?\.++?\.(us|info|to|br|bid|cn|ru)
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
LEARN ABOUT DEBIAN
graphics::primitive::insets
Graphics::Primitive::Insets(3pm) User Contributed Perl Documentation Graphics::Primitive::Insets(3pm)
NAME
Graphics::Primitive::Insets - Space between things
DESCRIPTION
Graphics::Primitive::Insets represents the amount of space that surrounds something. This object can be used to represent either padding
or margins (in the CSS sense, one being inside the bounding box, the other being outside)
SYNOPSIS
use Graphics::Primitive::Insets;
my $insets = Graphics::Primitive::Insets->new({
top => 5,
bottom => 5,
left => 5,
right => 5
});
METHODS
Constructor
new Creates a new Graphics::Primitive::Insets.
Instance Methods
as_array
Return these insets as an array in the form of top, right, bottom and left.
bottom
Set/Get the inset from the bottom.
equal_to
Determine if these Insets are equal to another.
left
Set/Get the inset from the left.
right
Set/Get the inset from the right.
top Set/Get the inset from the top.
zero
Sets all the insets (top, left, bottom, right) to 0.
AUTHOR
Cory Watson, "<gphat@cpan.org>"
SEE ALSO
perl(1)
COPYRIGHT & LICENSE
Copyright 2008-2010 by Cory G Watson.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.3 2010-08-21 Graphics::Primitive::Insets(3pm)