What does an '@' character mean in a csh scriptCan someone clarify this Bash scriptRead non-bash variables...
How can I answer high-school writing prompts without sounding weird and fake?
Why do Thanos's punches not kill Captain America or at least cause some mortal injuries?
Can the sorting of a list be verified without comparing neighbors?
How to slow yourself down (for playing nice with others)
What did Rocket give Hawkeye in "Avengers: Endgame"?
Does the category of finite dimensional free modules over a principal ideal domain have all finite colimits?
Why was this sacrifice sufficient?
Is a diamond sword feasible?
Why does the Earth follow an elliptical trajectory rather than a parabolic one?
Limit of an integral vs Limit of the integrand
Why does a C.D.F need to be right-continuous?
Why do unstable nuclei form?
What does it mean with the ask price is below the last price?
Is there enough time to Planar Bind a creature conjured by a one hour duration spell?
Understanding basic photoresistor circuit
Is there a need for better software for writers?
Looking for a simple way to manipulate one column of a matrix
How can this pool heater gas line be disconnected?
Delta TSA-Precheck status removed
Why can't RGB or bicolour LEDs produce a decent yellow?
How to make a Lich look like a human without magic in 5e?
How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?
How to select certain lines (n, n+4, n+8, n+12...) from the file?
What food production methods would allow a metropolis like New York to become self sufficient
What does an '@' character mean in a csh script
Can someone clarify this Bash scriptRead non-bash variables from a file into bash scriptWhat does dollar underscore mean in tcsh? $_how to change several piece of html codeWhat does $'r' mean?Variable Capture and For-Loop ArithmeticWhat does “test $2 &&” mean in this bash script?posix shell: print list of environment variable names (without values)Directory tree listing, script does not work in csh?Linux (shell script) csh
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I'm translating a csh script to bash an came across a line that looks like
@ lines = `grep num_lines ../config.txt | awk '{print("%d",int($2))}' `
What does the '@' do here?
I found some documentation stating that csh uses '@' for expressions. However, this looks like a normal variable assignment to me. When I run the grep and awk part of the code in bash the output is an integer with a preceding '%d', e.g. '%d 12045'.
bash csh
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I'm translating a csh script to bash an came across a line that looks like
@ lines = `grep num_lines ../config.txt | awk '{print("%d",int($2))}' `
What does the '@' do here?
I found some documentation stating that csh uses '@' for expressions. However, this looks like a normal variable assignment to me. When I run the grep and awk part of the code in bash the output is an integer with a preceding '%d', e.g. '%d 12045'.
bash csh
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I'm translating a csh script to bash an came across a line that looks like
@ lines = `grep num_lines ../config.txt | awk '{print("%d",int($2))}' `
What does the '@' do here?
I found some documentation stating that csh uses '@' for expressions. However, this looks like a normal variable assignment to me. When I run the grep and awk part of the code in bash the output is an integer with a preceding '%d', e.g. '%d 12045'.
bash csh
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'm translating a csh script to bash an came across a line that looks like
@ lines = `grep num_lines ../config.txt | awk '{print("%d",int($2))}' `
What does the '@' do here?
I found some documentation stating that csh uses '@' for expressions. However, this looks like a normal variable assignment to me. When I run the grep and awk part of the code in bash the output is an integer with a preceding '%d', e.g. '%d 12045'.
bash csh
bash csh
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 42 mins ago
LoibologicLoibologic
12
12
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Loibologic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});
}
});
Loibologic is a new contributor. Be nice, and check out our Code of Conduct.
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%2funix.stackexchange.com%2fquestions%2f518342%2fwhat-does-an-character-mean-in-a-csh-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Loibologic is a new contributor. Be nice, and check out our Code of Conduct.
Loibologic is a new contributor. Be nice, and check out our Code of Conduct.
Loibologic is a new contributor. Be nice, and check out our Code of Conduct.
Loibologic is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f518342%2fwhat-does-an-character-mean-in-a-csh-script%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