Skip to main content
se añadieron 172 caracteres en el cuerpo; etiquetas editadas
Origen Enlace

Como resultado de un bash script tengo esta parte final de codigo que me genera un archivo HTML a partir de un archivo de texto. Requiero cambiar a color ROJO ciertas de sus líneaslineas para poderlas diferenciar más fácilmentemas facilmente.

cat last_file.txt last_file_*.txt > Final_output.txt


    if [ $(grep -c "about" Final_output.txt) -gt 0 ]
    then
    
    awk -F' : ' '
      BEGIN{
        print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
      }
      {
         print "<tr>"
         for(i=1;i<=NF;i++)
           print "<td>" $i "</td>"
         print "</tr>"
      }
      END{
        print "</table></body></html>"
      }
    ' Final_output.txt > Certificates_$current_date.html


echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected]
else
echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]

cat last_file.txt last_file_*.txt > Final_output.txt

if [ $(grep -c "about" Final_output.txt) -gt 0 ]
then

awk -F' : ' '
  BEGIN{
    print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
  }
  {
     print "<tr>"
     for(i=1;i<=NF;i++)
       print "<td>" $i "</td>"
     print "</tr>"
  }
  END{
    print "</table></body></html>"
  }
' Final_output.txt > Certificates_$current_date.html

echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected] else echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]

Adjunto Archivo de salida. deseo cambiar las lineas que contienen la palabra "about" a color ROJO.Salida html

Como resultado de un bash script tengo esta parte final de codigo que me genera un archivo HTML a partir de un archivo de texto. Requiero cambiar a color ROJO ciertas de sus líneas para poderlas diferenciar más fácilmente.

cat last_file.txt last_file_*.txt > Final_output.txt


    if [ $(grep -c "about" Final_output.txt) -gt 0 ]
    then
    
    awk -F' : ' '
      BEGIN{
        print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
      }
      {
         print "<tr>"
         for(i=1;i<=NF;i++)
           print "<td>" $i "</td>"
         print "</tr>"
      }
      END{
        print "</table></body></html>"
      }
    ' Final_output.txt > Certificates_$current_date.html


echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected]
else
echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]

Como resultado de un bash script tengo esta parte final de codigo que me genera un archivo HTML a partir de un archivo de texto. Requiero cambiar a color ROJO ciertas de sus lineas para poderlas diferenciar mas facilmente.

cat last_file.txt last_file_*.txt > Final_output.txt

if [ $(grep -c "about" Final_output.txt) -gt 0 ]
then

awk -F' : ' '
  BEGIN{
    print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
  }
  {
     print "<tr>"
     for(i=1;i<=NF;i++)
       print "<td>" $i "</td>"
     print "</tr>"
  }
  END{
    print "</table></body></html>"
  }
' Final_output.txt > Certificates_$current_date.html

echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected] else echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]

Adjunto Archivo de salida. deseo cambiar las lineas que contienen la palabra "about" a color ROJO.Salida html

Formato de código, ortografía
Origen Enlace
jachguate
  • 32.1k
  • 8
  • 41
  • 69

Como resultado de un bash script tengo esta parte final de codigo que me genera un archivo HTML a partir de un archivo de texto. Requiero cambiar a color ROJO ciertas de sus lineaslíneas para poderlas diferenciar mas facilmente.

cat last_file.txt last_file_*.txt > Final_outputmás fácilmente.txt

if [ $(grep -c "about" Final_output.txt) -gt 0 ]
then

awk -F' : ' '
  BEGIN{
    print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
  }
  {
     print "<tr>"
     for(i=1;i<=NF;i++)
       print "<td>" $i "</td>"
     print "</tr>"
  }
  END{
    print "</table></body></html>"
  }
' Final_output.txt > Certificates_$current_date.html

echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected] else echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]

cat last_file.txt last_file_*.txt > Final_output.txt


    if [ $(grep -c "about" Final_output.txt) -gt 0 ]
    then
    
    awk -F' : ' '
      BEGIN{
        print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
      }
      {
         print "<tr>"
         for(i=1;i<=NF;i++)
           print "<td>" $i "</td>"
         print "</tr>"
      }
      END{
        print "</table></body></html>"
      }
    ' Final_output.txt > Certificates_$current_date.html


echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected]
else
echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]

Como resultado de un bash script tengo esta parte final de codigo que me genera un archivo HTML a partir de un archivo de texto. Requiero cambiar a color ROJO ciertas de sus lineas para poderlas diferenciar mas facilmente.

cat last_file.txt last_file_*.txt > Final_output.txt

if [ $(grep -c "about" Final_output.txt) -gt 0 ]
then

awk -F' : ' '
  BEGIN{
    print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
  }
  {
     print "<tr>"
     for(i=1;i<=NF;i++)
       print "<td>" $i "</td>"
     print "</tr>"
  }
  END{
    print "</table></body></html>"
  }
' Final_output.txt > Certificates_$current_date.html

echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected] else echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]

Como resultado de un bash script tengo esta parte final de codigo que me genera un archivo HTML a partir de un archivo de texto. Requiero cambiar a color ROJO ciertas de sus líneas para poderlas diferenciar más fácilmente.

cat last_file.txt last_file_*.txt > Final_output.txt


    if [ $(grep -c "about" Final_output.txt) -gt 0 ]
    then
    
    awk -F' : ' '
      BEGIN{
        print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
      }
      {
         print "<tr>"
         for(i=1;i<=NF;i++)
           print "<td>" $i "</td>"
         print "</tr>"
      }
      END{
        print "</table></body></html>"
      }
    ' Final_output.txt > Certificates_$current_date.html


echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected]
else
echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]
Origen Enlace

Como puedo cambiar el color de determinadas lineas de mi HTML file generado por un BASH

Como resultado de un bash script tengo esta parte final de codigo que me genera un archivo HTML a partir de un archivo de texto. Requiero cambiar a color ROJO ciertas de sus lineas para poderlas diferenciar mas facilmente.

cat last_file.txt last_file_*.txt > Final_output.txt

if [ $(grep -c "about" Final_output.txt) -gt 0 ]
then

awk -F' : ' '
  BEGIN{
    print "<html><style type=\"text/css\">table, th, td {border: 1px solid black;}</style><body><table><th>ENVIRONMENT CERTIFICATES</th>"
  }
  {
     print "<tr>"
     for(i=1;i<=NF;i++)
       print "<td>" $i "</td>"
     print "</tr>"
  }
  END{
    print "</table></body></html>"
  }
' Final_output.txt > Certificates_$current_date.html

echo -e "Please check the attachment and output below to verify certificates that will expire within 30 days\n\n $(cat \Final_output.txt)" | mailx -a Certificates_$current_date.html -s "ENVIRONMENT CERTIFICATES, Certificates Expiring Soon" [email protected] else echo "There is no current SSL certificates that will expire within next 30 days. " |mailx -s "SSL CERTIFICATES REMAIN VALID" [email protected]