3 edited tags
| link
2 added 1 character in body
source | link

I'm translating a csh script to bash an came across a line that looks like

@ lines = `grep num_lines ../config.txt | awk '{printprintf("%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'.

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'.

I'm translating a csh script to bash an came across a line that looks like

@ lines = `grep num_lines ../config.txt | awk '{printf("%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'.

1
source | link

What does an '@' character mean in a csh script

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'.