Answer by unxnut for Link variables between two text files
I am surprised nobody has suggested using arrays. Here is my crude attempt (using the log3.txt idea from @Stephane above.#!/bin/bashnl1=$( wc -l < log1.txt )nl2=$( wc -l < log2.txt )nlnums=$( wc...
View ArticleAnswer by user88036 for Link variables between two text files
You can achieve what you want using case control structure as follows:#!/bin/bashlog1_length=$(wc -l <log1.txt)log2_length=$(wc -l <log2.txt)for i in $(seq $log1_length); do arg1="$(head -$i...
View ArticleAnswer by Sam for Link variables between two text files
Your shell does not know English, so automatically generating the spelled-out numbers with correct suffixes to an arbitrary count would involve some additional effort. With just digits for the...
View ArticleAnswer by Stéphane Chazelas for Link variables between two text files
With zsh and with libnumbertext-tools's spellout on Debian:#! /bin/zsh -colors=(${(f)"$(<log1.txt)"})adjectives=(${(f)"$(head -n ${#colors} <log2.txt)"})/usr/lib/libnumbertext/spellout -l...
View ArticleLink variables between two text files
The following explanation is just a representation for what I would like to achieve.I have two text files: The first text file log1.txt contain the following...
View Article