Bash not recognizing single quotes in Mac?

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Bash not recognizing single quotes in Mac?
# 1  
Old 07-25-2016
Bash not recognizing single quotes in Mac?

Hi, I just bought a new mac and have been running a program out of terminal, but even early on I noticed that my single quotes looked a lot different from the ones used in all of the namelists and other files of the program. Specifically, mine are kind of slanted whereas the others are very straight up and down. I've also noticed now that my quotes aren't being recognized as the same symbol as the straight up and down ones, forcing me to copy and paste a lot while I'm editing the inlists of the program. Has anyone else had this problem or possibly know how to fix it? Thanks!
# 2  
Old 07-25-2016
Not while using vi. What editor are you using?
# 3  
Old 07-25-2016
I had just been using TextEdit, but when I did use vi i didn't have he problem anymore. Not sure what was happening with the other one but will definitely be sticking to vi now, thanks!
# 4  
Old 07-25-2016
If you ever happen to use it Microsoft Word has the same "feature". I never understood why typesetters needed nine kinds of apostrophes.
# 5  
Old 07-25-2016
The following text was written using TextEdit with the Smart Quotes option enabled:
Quote:
“This is a double-quoted string containing a quote: “Hello World”.”
‘This is a single-quoted string containing a quote: ‘Hello World'.'
I don't mind text formatted this way in a book or newspaper, but it isn't suitable for C, shell, or any other programming language source code. And, if C, shell, or any other programming language source code is displayed in a book or newspaper, typesetter's quotes MUST NOT be used in the book or newspaper for that code either.
The following text was written using TextEdit with the Smart Quotes option disabled:
Quote:
"This is a double-quoted string containing a quote: "Hello World"."
'This is a single-quoted string containing a quote: 'Hello World'.'
I don't mind text formatted this way in a book or newspaper, and it is suitable for C, shell, or any other programming language source code.
In TextEdit on OS X release 10.11.6 (El Capitan), the Smart Quotes option can be enabled or disabled in the Edit menu Substitutions sub-menu. Note that Smart Quotes is not the only option available in TextEdit that will select varying characters based on context that will break source code. Other than for writing examples like this post, I NEVER use TextEdit.
# 6  
Old 07-26-2016
Quote:
Originally Posted by Corona688
If you ever happen to use it Microsoft Word has the same "feature". I never understood why typesetters needed nine kinds of apostrophes.
Because typesetters typeset text not only in english. Sorry to say that, but especially americans think that diacriticals are mere decoration while in fact they are often vital to convey a certain meaning.

I once read the (german) tempo-command "mäßig bewegt" in an american music score-sheet (Hindemith, Sonata for Horn in F major, op. 11) made into "massig bewegt". The funny thing was that "massig" is in fact a word in german, as well as "mäßig". "Massig" comes from "Masse" (mass) and means "with (great) mass", while "mäßig" comes from "Maß" (measure) and means "measured(ly)" or "somewhat". So instead of "measuredly moving" it read "massively moving".

Sorry for that non-technical interruption, but this has to be said sometimes.

bakunin

Last edited by bakunin; 07-26-2016 at 04:42 AM..
# 7  
Old 07-26-2016
And they did that by using the wrong quotation mark?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with Single Quotes and Double Quotes for prompt PS1

Hi, Trying to change the prompt. I have the following code. export PS1=' <${USER}@`hostname -s`>$ ' The hostname is not displayed <abc@`hostname -s`>$ uname -a AIX xyz 1 6 00F736154C00 <adcwl4h@`hostname -s`>$ If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies

2. Shell Programming and Scripting

Bash shell adding extra single quotes

AIX 6.1 bash shell #!/bin/bash -x STATEMENT="cvs commit -m \"This is\" ../PBP/EIR.ENTRY" echo $STATEMENT exit 0 This is the output + STATEMENT='cvs commit -m "This is" ../PBP/EIR.ENTRY' + echo cvs commit -m '"This' 'is"' ../PBP/EIR.ENTRY cvs commit -m "This is" ../PBP/EIR.ENTRY + exit... (26 Replies)
Discussion started by: hpodhrad
26 Replies

3. Shell Programming and Scripting

bash not recognizing cluster commands

hi folks, please help me with this, my bash script is not recognizing veritas cluster commands, giving error such as "bash: hastatus: command not found". the piece of code is ssh -p 22022 test02 'hastatus -sum |grep j2ee|grep -i online' > /tmp/j2ee.log (2 Replies)
Discussion started by: gauravsharma29
2 Replies

4. Shell Programming and Scripting

Having a terrible problem with quotes/single quotes!

Hello. I'm trying to write a bash script that uses GNU screen and have hit a brick wall that has cost me many hours... (I'm sure it has something to do with quoting/globbing, which is why I post it here) I can make a script that does the following just fine: test.sh: #!/bin/bash # make... (2 Replies)
Discussion started by: jondecker76
2 Replies

5. Shell Programming and Scripting

Replace single quote with two single quotes in perl

Hi I want to replace single quote with two single quotes in a perl string. If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
Discussion started by: DushyantG
3 Replies

6. UNIX for Dummies Questions & Answers

grep single quotes or double quotes

Unix superusers, I am new to unix but would like to learn more about grep. I am very familiar with regular expressions as i have used them for searching text files in windows based text editors. Since I am not very familiar with Unix, I dont understand when one should use GREP with the... (2 Replies)
Discussion started by: george_vandelet
2 Replies

7. Shell Programming and Scripting

Single quotes and double quotes

Hi guys, I have a sed line in double quotes which works fine, but I want it to be in single quotes here is the sed line sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/" can some one give the equivalent to the above script in single quotes Thanks a ton (5 Replies)
Discussion started by: sol_nov
5 Replies

8. Shell Programming and Scripting

Double quotes or single quotes when using ssh?

I'm not very familiar with the ssh command. When I tried to set a variable and then echo its value on a remote machine via ssh, I found a problem. For example, $ ITSME=itsme $ ssh xxx.xxxx.xxx.xxx "ITSME=itsyou; echo $ITSME" itsme $ ssh xxx.xxxx.xxx.xxx 'ITSME=itsyou; echo $ITSME' itsyou $... (3 Replies)
Discussion started by: password636
3 Replies

9. Shell Programming and Scripting

echo using single quotes

Hi, Please help me to echo the following statement using single quotes Why can't I write 's between single quotes Thanks in advance, Chella (3 Replies)
Discussion started by: chella
3 Replies

10. Shell Programming and Scripting

Filename containing Single Quotes

Hi , I am passing a variable site_name from a shellscript to an SQL script and then I want to spool an sql query on to my Unix box and generate a CSV file. Everything works fine but I have to give quotes to the variable '&&site_name' in spool statement ..if i remove the quotes it generates an LST... (6 Replies)
Discussion started by: phani
6 Replies
Login or Register to Ask a Question