search for: viviotech

Displaying 3 results from an estimated 3 matches for "viviotech".

2016 Jun 09
1
for loop example
...t; > > [root at centos67 loop]# cat file3 > > > firstname1 lastname1 > > > firstname2 lastname2 > > > > > > How can I get the same OUTPUT ? > > > > > > > > > *firstname1 lastname1firstname2 lastname2* > > > > scott at viviotech.net suggested this: > There's probably a better way using join, but this should do the trick: > paste <(cat file1 | tr "\n" ' ') <(cat file2 | tr "\n" " ") I'd never used the paste command before, so I tried the above oneliner out and it...
2016 Jun 07
2
for loop example
Maybe this don't to be the best form to solve your problem, but worked,rs. #!/bin/bash #power by Diego Rodrigues totalFileOne=$(wc -l file1 | cut -d" " -f1) totalFileTwo=$(wc -l file2 | cut -d" " -f1) count=0 if [ ! "${totalFileOne}" -eq "${totalFileTwo}" ];then echo "The two files need of same number of lines" exit 1 fi for
2016 Jun 09
0
for loop example
There's probably a better way using join, but this should do the trick: paste <(cat file1 | tr "\n" ' ') <(cat file2 | tr "\n" " ") On Tue, 07 Jun 2016 12:19:14 +0000 Diego <diegofull at gmail.com> wrote: > Maybe this don't to be the best form to solve your problem, but worked,rs. > > #!/bin/bash > #power by Diego Rodrigues