08-16-2013
Thanks!
...and sorry about not using the code tag in my post.
---------- Post updated at 11:18 AM ---------- Previous update was at 11:10 AM ----------
Quote:
Originally Posted by
Scrutinizer
If you leave a pattern unquoted it will work too, unless there happens to be one or more files in the current directory that match that pattern (the shell will then expand the pattern first), which can lead to surprising results, so it is a good habit to quote those patterns..
My takeaway is to use quotes.
I can also see that I don't understand the difference between the shell expanding the wildcards and the command expanding the wildcards. I'll go back and read again. I'll try some test file names to see how things work.
(Now I see that there is a "Thanks" button.)
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have input file like
RDBMS FALIURE UTY8703 'USER_WORK.TEST' .HIghest return code '12'
I want to parse data which comed between first quote till next quote
USER_WORK.TEST
can you please suggest how to do that (4 Replies)
Discussion started by: scorp_rahul23
4 Replies
2. Shell Programming and Scripting
hey all,
i made a simple .sh like this:
echo "<style media="screen" type="text/css">@import url("main.css");</style>"
but the output is:
<style media=screen type=text/css>@import url(main.css);</style>
i want to keep double-quotes, can anyone help me?
thanks (3 Replies)
Discussion started by: indraf
3 Replies
3. Shell Programming and Scripting
The command line bellow works fine by itself.
/opt/csw/bin/rsync -azq --delete -e "ssh -i /.ssh/ss" /home/ me@myaccount.storage.com:/home/
Now I would like to introduce some variable into it and make a .sh file such as bellow and it does not work anymore. I guess the part -e "ssh -i /.ssh/ss" has... (4 Replies)
Discussion started by: ngungo
4 Replies
4. Shell Programming and Scripting
Hi,
I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file:
Name = "abc"
The regex I'm using to match the same is:
egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies
5. Shell Programming and Scripting
i want to replace mistaken quotes in line starting with tag 300 and relocate the quote in the correct position so the input is
223;25
224;20100428064823;1;0;0;0;0;0;0;0;8;1;3;9697;18744;;;;;;;;;;;;
300;X;Event:... (3 Replies)
Discussion started by: wradwan
3 Replies
6. Shell Programming and Scripting
Can somebody supply me with a simple way to get a value between
two double quotes?
Example:
input = ADR base is "/u01/app/oracle"
output = /u01/app/oracle
Thanks to all who answer (4 Replies)
Discussion started by: BeefStu
4 Replies
7. Shell Programming and Scripting
Hi All ,
We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file
XLs data :
... (2 Replies)
Discussion started by: Shalini Badal
2 Replies
8. Shell Programming and Scripting
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies
9. What is on Your Mind?
Food for thought!
"""
Everybody in this country should learn to program a computer...because it teaches you how to think.
"""
Steve Jobs.
So, SO, true!
Merry XMAS all... (4 Replies)
Discussion started by: wisecracker
4 Replies
RTFM(1) General Commands Manual RTFM(1)
NAME
rtfm - a response for easy questions from clueless lusers
SYNOPSIS
rtfm [ -p ] [ -h ] [ -d option ] [ -i interval ] [ -a action ] [ -q luser]
DESCRIPTION
rtfm is a command for system administrators to use in dealing with new users. rtfm is useful for dealing with users having trouble with
their pictures downloaded from alt.binaries.pictures.erotica. rtfm will continue to run until killed by hand, using `kill processid'.
rtfm can be invoked by anyone who has enough of a clue to know what a man page is.
OPTIONS
-p Give the answer in a polite fashion.
-h Tell the clueless luser to go to hell. Used with the -p option, they'll look forward to the trip.
-d option
Debug mode using option where option is one of the following:
query Ask the luser what part of rtfm that he or she does not understand.
planet Ask what planet the luser is from.
literacy Ask the luser if the luser can read.
english Ask the luser if the luser understands English.
Mac Ask the luser if the luser has ever used a computer other than a Macintosh.
Nintendo Same as the Mac option, but slightly more harsh.
-i interval
Enable within interval seconds. interval is the time between a luser asking the same damn fool question. This option must be acti-
vated for the -a option. It stores the time of the question in /var/run/luser and checks that file each time that rtfm is activated.
interval is a number of minutes, of the form xxx.xx where each x is a decimal digit. The default is 5.00 minutes.
-a action
This defines some action to be taken in the event that the -i flag condition is met. action can be defined either at the flag level
or by a file. The options for flags are as follows:
scream Let out a scream of utter frustration.
hair Rip out your hair in total frustration.
rm Automatic command ran in lusers home directory. It can have an addition -rf flag added.
ignore Ignore the luser.
warn Warn the other sysadmins.
forward Forward to CNS advising. Particullary if the complaint is /dev/null is full.
kill Kill all the lusers processes.
FILE=file.name Use a file to define a course of actions. This can be any executeable file except those using ksh, which no god-fear-
ing right-thinking sysadmin would be caught using lest he be struck down by the wrath of God.
-q luser
Query file /etc/luser to see if luser is a real luser or a first time luser.
FILES
/etc/luser
SEE ALSO
mr.biff(2),
BUGS
rtfm only checks /var/run/luser when the -a option is specified and after the -i option is invoked. Otherwise /tmp would fill up rapidly on
many systems. Also, core may dump if the -a FILE= option is anatomically impossible.
GNU Utilities July 27, 1997 RTFM(1)