
Enviado em 01/11/2018 - 18:38h
#/bin/bash
C1="\e[0;38;5;226m"
C2="\e[0;38;5;2m"
C3="\e[0;38;5;39m"
str=$(sort ARQ1|uniq -d)
while read -r line;do
FNR=$(awk '/'"${line}"'/ {printf "FNR==%s||" ,NR}' ARQ1|sed 's/||$//');
awk -i inplace '{if ('${FNR}') ;else print $0}' ARQ1 ARQ2;
echo -e "\n${C1} Valor das Variáveis:\n${C2} STR: ${line} \n${C3} FNR: ${FNR}\x1B[m";
done <<< "$str"
#!/bin/bash
str=$(sort test.txt|uniq -d)
FNR=$(awk '/'"${str}"'/ {printf "FNR==%s||" ,NR}' test.txt|sed 's/||$//')
awk -i inplace '{if ('${FNR}') ;else print $0}' test.txt alert_data.txt
echo "valor de str: "
echo $str
ID: 1
ID: 2
ID: 3
ID: 4
1,1,1,1,1,1,normal
2,2,2,2,2,2,normal
3,3,3,3,3,3,normal
4,4,4,4,4,4,anomaly
4,4,4,4,4,4,anomaly
2,2,2,2,2,2,normal
3,3,3,3,3,3,normal
1,1,1,1,1,1,normal
ID: 4
ID: 2
ID: 3
ID: 1
str1=$(sort test.txt|uniq -d)
NR1=$(awk '/'"${str}"'/ {printf "NR==%s||" ,NR}' test.txt|sed 's/||$//')
awk -i inplace '{if ('${NR1}') ;else print $0}' test.txt
str2=$(sort alert_data.txt|uniq -d)
NR2=$(awk '/'"${str}"'/ {printf "NR==%s||" ,NR}' alert_data.txt|sed 's/||$//')
awk -i inplace '{if ('${NR2}') ;else print $0}' alert_data.txt
while read -r line;do
FNR=$(awk '/'"${line}"'/ {printf "FNR==%s||" ,NR}' ARQ1|sed 's/||$//');
awk -i inplace '{if ('${FNR}') ;else print $0}' ARQ1 ARQ2;
echo -e "\n${C1} Valor das Variáveis:\n${C2} STR: ${line} \n${C3} FNR: ${FNR}\x1B[m";
done <<< "$str"
Como criar um make.conf no Gentoo (para iniciantes)
Como instalar o Open WebUI para Ollama no Gentoo (com systemd)
INSTALAR (e jogar) COUNTER STRIKE 1.6 (install cs 1.6) NO LINUX
A tragédia silenciosa das distribuições baseadas (ou “agregadas”)
Papel de Parede Animado no KDE Plasma 6 (Com dicas para Gentoo)
Homebrew: o gerenciador de pacotes que faltava para o Linux!
Removendo a trava de versão do Project Brutality para GZDoom/UZDoom
Acelere a compilação no Gentoo com distcc (guia para Systemd)
KDE Plasma 6.5: Como manter o Projetor fixo enquanto você alterna Áreas de Trabalho no PC
Aplicações mudam entre monitores após tela de bloquio (4)









