Posts

Showing posts from March 15, 2019

.cfg file to .awk file

Image
Clash Royale CLAN TAG #URR8PPP 1 My color.cfg file from where I am reading a file is as below. marks,<,80,green marks,>,80,yellow I want to convert above color.cfg file into color.awk as below function check() if ( marks < 80 ) return "green" if (marks > 800) return "yellow" I have a shell script like below to convert .cfg to .awk. LINECT=0 while read LINE do var1[$LINECT]=$(echo $LINE | cut -d ',' -f1) var2[$LINECT]=$(echo $LINE | cut -d ',' -f2) var3[$LINECT]=$(echo $LINE | cut -d ',' -f3) var4[$LINECT]=$(echo $LINE | cut -d ',' -f4) LINECT=$((LINECT+1)) done < color.cfg echo $var1[@] echo $var2[@] echo $var3[@] echo $var4[@] echo $LINECT cat <<EOF > color.awk function check() if ($var1[0] $var2[0] $var3[0] ) return "$var4[0]" EOF My problem is how to write repetitive “if blocks” while writing a color.awk I have written “if block once but how to write if have 2 or 3 or 4 condi

Muscovite

Image
For other uses, see Muscovite (disambiguation). Muscovite Muscovite with albite from Doce valley, Minas Gerais, Brazil (dimensions: 6×5.3×3.9 cm) General Category Phyllosilicate Formula .mw-parser-output .noboldfont-weight:normal (repeating unit) KAl 2 (AlSi 3 O 10 )(F,OH) 2 Strunz classification 9.EC.15 Dana classification 71.02.02a.01 Crystal system Monoclinic Crystal class Prismatic (2/m) (same H-M symbol) Space group C2/c Unit cell a = 5.199 Å, b = 9.027 Å, c = 20.106 Å, β = 95.78°; Z = 4 Identification Color White, grey, silvery Crystal habit Massive to platy Twinning Common on the [310], less common on the 001 Cleavage Perfect on the 001 Fracture Micaceous Tenacity Elastic Mohs scale hardness 2–2.5 parallel to 001 4 right angle to 001 Luster Vitreous, silky, pearly Streak White Diaphaneity Transparent to translucent Specific gravity 2.76–3 Optical properties Biaxial (-) Refractive index n α = 1.552–1.576 n β = 1.582–1.615 n γ = 1.587–1.618 Birefringence δ = 0.035 – 0.042 Pleoc

Vim - opening man pages

Image
Clash Royale CLAN TAG #URR8PPP 1 I'm aware that exists a shortcut to open manpage of current function (the function cursor is on), but I can't recall how to do that. vim keyboard-shortcuts share | improve this question edited Feb 19 at 22:21 Rui F Ribeiro 41.5k 14 83 140 asked Feb 19 at 17:00 DDS DDS 229 10 add a comment  |  1 I'm aware that exists a shortcut to open manpage of current function (the function cursor is on), but I can't recall how to do that. vim keyboard-shortcuts share | improve this question edited Feb 19 at 22:21 Rui F Ribeiro 41.5k 14 83 140 asked Feb 19 at 17:00 DDS DDS 229 10 add a comment  |  1 1 1 I'm aware that exists a shortcut to open manpage of current function (the function cursor is on), but I can't recall how to do that. vim keyboard-shortcuts share | improve this questi