05-15-2008
It's because you don't
quote the arguments properly. But just adding double quotes around "$file" doesn't really help, either, because it's not a single file. I'd still recommend using tar or cpio for this.
Note there are two |:s before the mkdir, it's an "or"; "a || b" is a shorthand for "if not a then b" (which is equivalent to "a or b").
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies
2. Shell Programming and Scripting
Hi guys,
I'm creating a script that basically remove unreference files so at the moment I have something like:
DAYS=30
for DIRECTORY in `mount | awk '{ print $7}'`
do
find $DIRECTORY -type f -atime +$DAYS < ~/files.log
done
for FILE in `awk '{print $1}' ~/files.log`
do
cp... (2 Replies)
Discussion started by: hariza
2 Replies
3. UNIX for Dummies Questions & Answers
I'm having problems accessing the Knoppix software on my current computer and the replacement CD I ordered hasn't arrived yet.
I have a guess at what the answer would be for this question but I am not sure as I cannot test it with the software.
I have to create a directory called class, and... (1 Reply)
Discussion started by: mzero
1 Replies
4. UNIX for Dummies Questions & Answers
I am wanting to find files within a directory that are over a certain number of days old and copy them to another directory. And unfortunately not having much luck.......is someone able to help.
Would also like to add that there are literally thousands of files that I am wanting to copy in one... (3 Replies)
Discussion started by: hellfyre
3 Replies
5. UNIX for Dummies Questions & Answers
i understand by using the pwd command we get the present working directory.
which command is used to find absolute path from home directory to root..
What is absolute path to your and root user's home directory.:confused::confused::confused: (2 Replies)
Discussion started by: shaziafathima
2 Replies
6. Shell Programming and Scripting
I have a script in which i want to print absolute path of the same script irrespective of path from where i run script.
I am using
test.sh:
echo "pwd : `pwd`"
echo "script name: $0"
echo "dirname: `dirname $0`"
when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies
7. Shell Programming and Scripting
Hi everybody.
I need a command to print the absolute path of files which name starts always with a pattern (MOD03), independently on where they are in the filesystem.
I have tryedls -ld ${INPUTPREFIX}/*/*/* | grep MOD03 | awk '{ print $8 }'but I have to use "/*/*/*" in this case to have the... (5 Replies)
Discussion started by: canduc17
5 Replies
8. Shell Programming and Scripting
Hello,
I have a doubt:-
---------------------
Current script:-
################################################################################################
prefix=user@my-server:
find . -depth -type d -name .git -printf '%h\0' | while read -d "" path ; do (
cd "$path" || exit $?... (4 Replies)
Discussion started by: sahil_jammu
4 Replies
9. UNIX for Dummies Questions & Answers
Hello Everyone,
I want to convert
Relative Path - /home/stevin/data/APP_SERVICE/../datafile.txt
to
Absolute Path - /home/stevin/data/datafile.txt
Is there a built-in tool in Unix to do this or any good ideas as to how can I implement this.
-Steve (5 Replies)
Discussion started by: qwarentine
5 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
LEARN ABOUT CENTOS
ppi::token::quote
PPI::Token::Quote(3) User Contributed Perl Documentation PPI::Token::Quote(3)
NAME
PPI::Token::Quote - String quote abstract base class
INHERITANCE
PPI::Token::Quote
isa PPI::Token
isa PPI::Element
DESCRIPTION
The "PPI::Token::Quote" class is never instantiated, and simply provides a common abstract base class for the four quote classes. In PPI,
a "quote" is limited to only the quote-like things that themselves directly represent a string. (although this includes double quotes with
interpolated elements inside them).
The subclasses of "PPI::Token::Quote" are:
'' - PPI::Token::Quote::Single
"q{}" - PPI::Token::Quote::Literal
"" - PPI::Token::Quote::Double
"qq{}" - PPI::Token::Quote::Interpolate
The names are hopefully obvious enough not to have to explain what each class is here. See their respective pages for more details.
Please note that although the here-doc does represent a literal string, it is such a nasty piece of work that in PPI it is given the honor
of its own token class (PPI::Token::HereDoc).
METHODS
string
The "string" method is provided by all four ::Quote classes. It won't get you the actual literal Perl value, but it will strip off the
wrapping of the quotes.
# The following all return foo from the ->string method
'foo'
"foo"
q{foo}
qq <foo>
literal
The "literal" method is provided by ::Quote:Literal and ::Quote::Single. This returns the value of the string as Perl sees it: without the
quote marks and with "\" and "'" resolved to "" and "'".
The "literal" method is not implemented by ::Quote::Double or ::Quote::Interpolate yet.
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.3 2011-02-26 PPI::Token::Quote(3)