Search Results

Search: Posts Made By: Leo_Boon
1,547
Posted By jim mcnamara
#!/bin/bash VARIABLE=$1 awk '{print first...
#!/bin/bash
VARIABLE=$1
awk '{print first line}' $VARIABLE > Intermediate.ter
awk '{print second line}' $VARIABLE > Intermediate_2.ter
command Intermediate.ter Intermediate_2.ter > Output.out
...
2,185
Posted By neutronscott
while grep -q NaN Output3.out do command ...
while grep -q NaN Output3.out
do
command
done


---------- Post updated at 09:33 AM ---------- Previous update was at 09:31 AM ----------

that's asking for an infinite loop though....
7,145
Posted By Corona688
You can specify the number of places after the...
You can specify the number of places after the decimal point, but not the number of digits in general.

What I'd do is print it to more decimal places than you need into a variable, then substr()...
1,209
Posted By Franklin52
awk 'NR < 5{a[NR%5]=$0; next}{print $0 +...
awk 'NR < 5{a[NR%5]=$0; next}{print $0 + a[NR%5+1]}' file


Use nawk or /usr/xpg4/bin/awk on Solaris if you get errors.
1,209
Posted By CarloM
You could do something like: awk '{...
You could do something like:
awk '{ lines[NR]=$0 } END { print lines[1]+lines[5] }' filename
2,286
Posted By Corona688
I think this may do close to what you want: ...
I think this may do close to what you want:

# hydrogen.awk

FNR == 1 { FILECOUNT++ }

# Load master data table into memory
NR == FNR { for(N=1; N<=NF; N++)
{
...
Showing results 1 to 6 of 6

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