Ampersand at the beginning of a line in csh The 2019 Stack Overflow Developer Survey Results...
The variadic template constructor of my class cannot modify my class members, why is that so?
Can smartphones with the same camera sensor have different image quality?
Why did all the guest students take carriages to the Yule Ball?
How to split my screen on my Macbook Air?
Match Roman Numerals
Who or what is the being for whom Being is a question for Heidegger?
How do I add random spotting to the same face in cycles?
"... to apply for a visa" or "... and applied for a visa"?
How do you keep chess fun when your opponent constantly beats you?
How to remove this toilet supply line that seems to have no nut?
How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?
Did God make two great lights or did He make the great light two?
Create an outline of font
Why is superheterodyning better than direct conversion?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
Keeping a retro style to sci-fi spaceships?
ELI5: Why do they say that Israel would have been the fourth country to land a spacecraft on the Moon and why do they call it low cost?
Derivation tree not rendering
Is this wall load bearing? Blueprints and photos attached
How are presidential pardons supposed to be used?
Did the new image of black hole confirm the general theory of relativity?
Wall plug outlet change
How should I replace vector<uint8_t>::const_iterator in an API?
Can withdrawing asylum be illegal?
Ampersand at the beginning of a line in csh
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!Biggest command-line mistake?Does Windows have a built-in ZIP command for the command line?What is the difference between double and single square brackets in bash?Search and delete lines matching a pattern along with comments in previous line if anyBash: how to know if the last command's output ends with a newline or not?Use linefeed or carriage return in Subversion commit message from the command lineKeyboard shortcut to store typed command and clean the lineLast line in a `tcsh` script does not runWhy is “chmod -R 777 /” destructive?How do I use the excape characters properly in csh's builtin echo command?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
What does an ampersand at the beginning of a line do in csh?
It seems to be ignored (with no error message), but why?
Example:
& echo 'hi there'
performs the expected echo without any error message.
linux unix shell command-line-interface
add a comment |
What does an ampersand at the beginning of a line do in csh?
It seems to be ignored (with no error message), but why?
Example:
& echo 'hi there'
performs the expected echo without any error message.
linux unix shell command-line-interface
add a comment |
What does an ampersand at the beginning of a line do in csh?
It seems to be ignored (with no error message), but why?
Example:
& echo 'hi there'
performs the expected echo without any error message.
linux unix shell command-line-interface
What does an ampersand at the beginning of a line do in csh?
It seems to be ignored (with no error message), but why?
Example:
& echo 'hi there'
performs the expected echo without any error message.
linux unix shell command-line-interface
linux unix shell command-line-interface
edited 1 min ago
Peter Mortensen
2,14242124
2,14242124
asked Feb 23 '10 at 16:23
JoelFanJoelFan
1,01541630
1,01541630
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
It's backgrounding "nothing". The ampersand also functions as a command delimiter like ;
.
You'll find that
; echo 'hi there'
does (in this case) essentially the same thing.
These, however, are different:
sleep 10 ; echo 'hi' & echo 'there'
sleep 10 ; echo 'hi' ; echo 'there'
add a comment |
It behaves this way because that's how the implementors of CSH decided it should be treated.
Seems like the csh family shells behave like this while the Bourne family of shells throw an error (since it is likely to be an input error)
But what's the logic of it?
– JoelFan
Feb 23 '10 at 16:58
See Dennis's answer for the 'logic' of it.
– MikeyB
Feb 24 '10 at 2:49
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f115857%2fampersand-at-the-beginning-of-a-line-in-csh%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's backgrounding "nothing". The ampersand also functions as a command delimiter like ;
.
You'll find that
; echo 'hi there'
does (in this case) essentially the same thing.
These, however, are different:
sleep 10 ; echo 'hi' & echo 'there'
sleep 10 ; echo 'hi' ; echo 'there'
add a comment |
It's backgrounding "nothing". The ampersand also functions as a command delimiter like ;
.
You'll find that
; echo 'hi there'
does (in this case) essentially the same thing.
These, however, are different:
sleep 10 ; echo 'hi' & echo 'there'
sleep 10 ; echo 'hi' ; echo 'there'
add a comment |
It's backgrounding "nothing". The ampersand also functions as a command delimiter like ;
.
You'll find that
; echo 'hi there'
does (in this case) essentially the same thing.
These, however, are different:
sleep 10 ; echo 'hi' & echo 'there'
sleep 10 ; echo 'hi' ; echo 'there'
It's backgrounding "nothing". The ampersand also functions as a command delimiter like ;
.
You'll find that
; echo 'hi there'
does (in this case) essentially the same thing.
These, however, are different:
sleep 10 ; echo 'hi' & echo 'there'
sleep 10 ; echo 'hi' ; echo 'there'
answered Feb 23 '10 at 17:47
Dennis WilliamsonDennis Williamson
50.8k1191127
50.8k1191127
add a comment |
add a comment |
It behaves this way because that's how the implementors of CSH decided it should be treated.
Seems like the csh family shells behave like this while the Bourne family of shells throw an error (since it is likely to be an input error)
But what's the logic of it?
– JoelFan
Feb 23 '10 at 16:58
See Dennis's answer for the 'logic' of it.
– MikeyB
Feb 24 '10 at 2:49
add a comment |
It behaves this way because that's how the implementors of CSH decided it should be treated.
Seems like the csh family shells behave like this while the Bourne family of shells throw an error (since it is likely to be an input error)
But what's the logic of it?
– JoelFan
Feb 23 '10 at 16:58
See Dennis's answer for the 'logic' of it.
– MikeyB
Feb 24 '10 at 2:49
add a comment |
It behaves this way because that's how the implementors of CSH decided it should be treated.
Seems like the csh family shells behave like this while the Bourne family of shells throw an error (since it is likely to be an input error)
It behaves this way because that's how the implementors of CSH decided it should be treated.
Seems like the csh family shells behave like this while the Bourne family of shells throw an error (since it is likely to be an input error)
answered Feb 23 '10 at 16:45
MikeyBMikeyB
33.2k784174
33.2k784174
But what's the logic of it?
– JoelFan
Feb 23 '10 at 16:58
See Dennis's answer for the 'logic' of it.
– MikeyB
Feb 24 '10 at 2:49
add a comment |
But what's the logic of it?
– JoelFan
Feb 23 '10 at 16:58
See Dennis's answer for the 'logic' of it.
– MikeyB
Feb 24 '10 at 2:49
But what's the logic of it?
– JoelFan
Feb 23 '10 at 16:58
But what's the logic of it?
– JoelFan
Feb 23 '10 at 16:58
See Dennis's answer for the 'logic' of it.
– MikeyB
Feb 24 '10 at 2:49
See Dennis's answer for the 'logic' of it.
– MikeyB
Feb 24 '10 at 2:49
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f115857%2fampersand-at-the-beginning-of-a-line-in-csh%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown