Sponsored Content
Full Discussion: To quote or not
Top Forums UNIX for Dummies Questions & Answers To quote or not Post 302844145 by Corona688 on Friday 16th of August 2013 04:37:03 PM
Old 08-16-2013
Quote:
Originally Posted by g.j.huebschman
I can also see that I don't understand the difference between the shell expanding the wildcards and the command expanding the wildcards.
When in doubt, see what it does when you feed it into echo. If anything gets changed, it's the shell that's doing it, not echo, because echo is stupid and dumb and translates nothing.

Code:
$ touch abcdefg # Create empty file
$ echo a* # Shell turns a* into abcdefg BEFORE echo is run
abcdefg

$ echo "a*" # Quotes prevent the shell from changing it
a*

$ rm abcdefg # Remove file, so its no longer found
$ echo a* # Since there are no files beginning with a, the shell leaves it as a*
a*

$


Last edited by Corona688; 08-16-2013 at 05:42 PM..
This User Gave Thanks to Corona688 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capturing Data between first quote and next quote

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

double-quote inside double-quote

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

Quote and variable

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

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

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

replacing a quote in some lines with multiple quote fields

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

getting value between double quote

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

Replacing Double Quote in Double Quote incsv file

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

Replacing all but the first and last double quote in a line with a single quote with awk

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?

A terrific quote:

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
AMC-ANNOTE(1)						       Auto Multiple Choice						     AMC-ANNOTE(1)

NAME
AMC-annote - completed answer sheets annotation after marking for AMC multiple choice exams. SYNOPSIS
auto-multiple-choice annote --projet project-dir --data project-data-dir --fich-assoc assoc.xml [annotation options...] DESCRIPTION
The AMC-annote.pl command annotates papers scans with scores for all questions, global score and mark, resulting in JPEG files (one for each page). --projet project-dir sets the project directory. --data project-data-dir gives the directory where data files are (see for example AMC-prepare(1)). --cr project-cr-dir sets the project reports directory, where to find data capture reports prepared by AMC-analyse(1), and where to output annotated scans. Default value is project-dir/cr. --fich-noms students-list.csv sets the students list file name. --noms-encodage encoding selects an encoding for file students-list.csv (default is utf-8). --qualite qual sets JPEG quality for output files. Default value is 65. --taille-max maxsize sets the maximal size for output files (in the format widthxheight, in pixels). Default value is 1000x1500. --pointsize-nl lines sets the size of texts requiring that with this size, the number of text lines that fits on the page height must be lines. Default value is 60. --verdict header sets the text header to be printed on each first page of the students copies. This text may contain CR characters for multi-line headers. Some sequences are substituted in it: %S is replaced by the student total score. %M is replaced by the maximum total score. %s is replaced by the student mark. %m is replaced by the maximum mark. %(ID) is replaced by the student's name. %(COL) is replaced by the value of column COL in the students list for the curent student. --ch-sign nc Sets the number nc of significant digits to use when printing global mark. --symbols symbols-definition defines how boxes will be annotated. symbols-definition is a comma separated list of H-A:shape:colour constructs, where H is 0 or 1 depending on wether the box has to be checked or not, A is 0 or 1 depending on wether the box is actually checked or not, shape is one of none, circle, mark, box and coulour is a colour (name or #RGB, see ImageMagick or GraphicsMagick documentation for details). Default value is "0-0:none,0-1:circle:red,1-0:mark:red,1-1:mark:blue". --position pos sets the position of individual questions scores. pos may be 'none' (do dot write individual scores), 'marge' (write scores in the margin) or 'case' (write scores at the left of the left-most box for the question. --ecart dx sets the horizontal space to let between individual question score and the leftmost box when --position case is used. --ecart-marge x sets the x position for individual questions scores when written in the margin (in em units). --line-width lw sets the line width for symbols drwan on the scans (in pixels). Default value is 2. --indicatives bool say if indicative questions are to be annotated (use 1 for a true value; default is false). --debug file.log gives a file to fill with debugging information. AUTHORS
Alexis Bienvenue <paamc@passoire.fr> Main author Jean Berard Translation from French Georges Khaznadar Translation from French COPYRIGHT
Copyright (C) 2008-2012 Alexis Bienvenue This document can be used according to the terms of the GNU General Public License, version 2 or later. Auto Multiple Choice 1.1.1 06/19/2012 AMC-ANNOTE(1)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy