View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000617 | OpenFOAM | Bug | public | 2012-08-07 11:22 | 2012-08-28 15:35 |
Reporter | wyldckat | Assigned To | henry | ||
Priority | low | Severity | text | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | ||
Summary | 0000617: Instructions for the Deb packages - Some users have difficulty in telling apart ` from ' | ||||
Description | I've seen this before and was brought to my attention today once again. Some users have difficulty in telling apart ` from ' when using the command line, which leads them to be unable to properly follow these instructions: http://www.openfoam.org/download/ubuntu.php The suggestion with this report is to change this line: VERS=`lsb_release -cs` To this: VERS=$(lsb_release -cs) It's an older form of doing the same thing, although harder to use in some corner cases... Either way, this way it isn't as ambiguous for new users, so they won't have problems with the very first command they type for installing OpenFOAM ;) Also, indicating that they check the assigned value would also be a good idea: echo $VERS | ||||
Additional Information | Came back to my attention on this post at the forum: http://www.cfd-online.com/Forums/openfoam-installation/103129-errors-while-installing-openfoam-ubuntu-12-04-11-10-a.html#post375664 | ||||
Tags | No tags attached. | ||||
|
Not related to the issue, but why should $(...) be harder to use than `...`? IMHO it is the other way around, since you can easily nest $(...), but with the back-tick form you need to escape the nested substitution with a backslash. Also there's a clear distinction between the beginning and the end of the command substitution, using the back-ticks can be confusing in that respect. |
|
Maybe I phrased it wrong... the idea is to change to: VERS=$(lsb_release -cs) simply because some users type the commands manually and use apostrophes instead of back-ticks. Either that or their keyboards don't have or have never used back-ticks... |
|
Wait, now I under stand the remark about "harder"... I saw some corner cases sometime ago, due to character escaping... I'll have to search for them. |
|
Mmmm... I apparently got the two methods switched when I memorized the information about them... back-ticks is the old form and has been considered a nightmare for quite sometime now. Here's an interesting report on this: http://www.linuxquestions.org/questions/linux-general-1/notation-difference-var%3D%60command%60-and-var%3D%24-command-458080/#post2307324 Nonetheless, even if $(...) is the best way to do things, I know there are some corner cases where it get very tricky to use this... PS: sorry about using this report almost as a forum thread, but it seemed relevant to this issue. |
|
Another, perhaps simpler way of getting people started, would be to provide a kickstarter script like the developer of homebrew does: http://mxcl.github.com/homebrew/ I imagine the instructions would look like sh <(wget -qO - http://openfoam.org/download/ubuntu/go.sh) The script could then do all the required setup, from writing a /etc/apt/sources.list.d/openfoam.list, to calling apt-get update to installing the appropriate packages. |
|
Something like this, perhaps? https://github.com/themiwi/OpenFOAM-Ubuntu-Installer |
|
Updated it to work for Fedora and OpenSUSE too. Relocated the repository to https://github.com/themiwi/OpenFOAM-Installer. |
|
Thanks for the suggestion, we have now replaced backquotes with the $() syntax to avoid problems for people typing the commands rather than using the easier copy/paste method. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-08-07 11:22 | wyldckat | New Issue | |
2012-08-07 13:27 |
|
Note Added: 0001563 | |
2012-08-07 13:29 |
|
Note Edited: 0001563 | |
2012-08-07 13:48 | wyldckat | Note Added: 0001564 | |
2012-08-07 13:49 | wyldckat | Note Edited: 0001564 | |
2012-08-07 13:53 | wyldckat | Note Added: 0001566 | |
2012-08-07 14:09 | wyldckat | Note Added: 0001567 | |
2012-08-07 14:25 |
|
Note Added: 0001568 | |
2012-08-07 14:25 |
|
Note Edited: 0001568 | |
2012-08-07 20:00 |
|
Note Added: 0001570 | |
2012-08-07 20:01 |
|
Note Edited: 0001568 | |
2012-08-09 16:37 |
|
Note Added: 0001581 | |
2012-08-28 15:35 | henry | Note Added: 0001641 | |
2012-08-28 15:35 | henry | Status | new => resolved |
2012-08-28 15:35 | henry | Resolution | open => fixed |
2012-08-28 15:35 | henry | Assigned To | => henry |