Search Results

Search: Posts Made By: begin_shell
1,267
Posted By bartus11
Try this:/^SOURCE: TIMESTEP/ { if (p) { ...
Try this:/^SOURCE: TIMESTEP/ {
if (p) {
for (i in c) {
print i" "x[i]/c[i]" "y[i]/c[i]" "z[i]/c[i]
c[i]=0
x[i]=0
y[i]=0
z[i]=0
}
}
print
...
1,267
Posted By bartus11
Put this in "script.awk":/^Step/ /^ID/ ...
Put this in "script.awk":/^Step/
/^ID/
/^Time/ && p {
for (i in c) {
print i" "x[i]/c[i]" "y[i]/c[i]" "z[i]/c[i]
c[i]=0
x[i]=0
y[i]=0
z[i]=0
}
}...
1,267
Posted By bartus11
Can you post the output that you are getting? I...
Can you post the output that you are getting? I get something like this:# awk -f script.awk datafile
Step:1
ID X Y z
1 0.65 -3.9 0.35
2 0.725 0 0.25
3 0.15 -1.65 0.855
Step:2
ID ...
2,900
Posted By Chubler_XL
Using a loop within gnuplot is the most...
Using a loop within gnuplot is the most efficient, but if it's proving to be too hard for you to maintain you could try using a bash/ksh loop and call gnuplot once for each file like this:

for...
2,900
Posted By Chubler_XL
The posted solution was a shell script that calls...
The posted solution was a shell script that calls gnuplot for each data file.

Save the code to a file as plotdata.sh in same directory as your _data files and from unix command line use:

$ ls...
1,779
Posted By Scrutinizer
Try: awk 'NR==FNR{A[$1]; next}$1 in A' file1...
Try:
awk 'NR==FNR{A[$1]; next}$1 in A' file1 file2
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 04:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy