Search Results

Search: Posts Made By: sidnow
31,677
Posted By sidnow
Thank you Don for looking into this, but I...
Thank you Don for looking into this, but I believe Aia has given the correct solution

#!/bin/bash

content=$(awk -F, '$5 ~ /Match/' file.txt)

if [[ -n "$content" ]]; then
echo "$content"...
31,677
Posted By sidnow
Hi RudiC, Not sure how to do that...
Hi RudiC,

Not sure how to do that :confused::confused::confused:
31,677
Posted By sidnow
The Mathcing code was just a general statement ...
The Mathcing code was just a general statement

$5 ~ /Match/ {
if (NR==0) print "No data"
else print "<tr>"
for(i=1;i<=NF;i++)
print "<td>" $i"</td>"
...
31,677
Posted By sidnow
Raw file Rent,City,Car,Amount,Name ...
Raw file
Rent,City,Car,Amount,Name
Pending,Chicago,BMW,4k,jack
Not pending,New York,Mercedes,Mary

So daily I would filter the file manually where the column rent would have records which are...
31,677
Posted By sidnow
You are right Aia, i needed NR==0. I modified...
You are right Aia, i needed NR==0.
I modified the code

awk -F, 'BEGIN{
print "To: abc@123.com"
print "MIME-Version: 1.0"
print "Content-Type: text/html"
print "<html><table>"
print...
31,677
Posted By sidnow
awk within awk
Hi I am trying to execute below code

awk -F, 'BEGIN{print "STARTING"}$5 ~ /Match/ { if(NF==0) print "No Match"; else
{awk -F, 'BEGIN{
print "To: abc@123.com"
print "MIME-Version: 1.0"
print...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 05:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy