Write shell script using awk/grep command and print success/failure for matched keywords
₹600-1500 INR
Completed
Posted about 8 years ago
₹600-1500 INR
Paid on delivery
I have a log file and I am trying to write a shell script to find pause/play happening or not (Success /Failure).
The script should do the following:
if ("trickModeRequest":{"rate":0.0})
{
if ("status":"OK")
printf("Pause Successful");
else if ("status":"GENERAL_ERROR")
printf("Pause failed");
else if ("status":"UNRECOGNIZED REQUEST")
printf("Pause failed");
}
Similarly:
if ("trickModeRequest":{"rate":1.0})
{
if ("status":"OK")
printf("Play Successful");
else if ("status":"GENERAL_ERROR")
printf("Play failed");
else if ("status":"UNRECOGNIZED REQUEST")
printf("Play failed");
}
Script file ([login to view URL]) and log file are attached
Run the following command :sh [login to view URL] [login to view URL]