Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Bash to print if keyword not in file

Shell Programming and Scripting

sed, solved

Thread Tools Search this Thread Display Modes
Old Unix and Linux 01-07-2017
MadeInGermany MadeInGermany is offline Forum Staff  
Join Date: May 2012
Last Activity: 20 September 2017, 6:46 AM EDT
Location: Simplicity
Posts: 3,741
Thanks: 306
Thanked 1,256 Times in 1,135 Posts
For plain string matches consider the index function

if (index($0,i) || ! index($0,"Medexome.tar.bz2")) p=0

Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Print all lines between two keyword if a specific pattern exist Amit Joshi Shell Programming and Scripting 8 08-14-2015 01:35 PM
Search for a Keyword in file and replace another keyword or add at the end of line dashing201 Shell Programming and Scripting 7 05-05-2014 04:04 PM
How to print Specific keyword, by using awk? ooilinlove Shell Programming and Scripting 4 03-09-2012 12:11 PM
compare two files and search keyword and print output cdfd123 Shell Programming and Scripting 5 12-03-2010 07:45 AM
how to search a keyword within a file using a for loop lucho_1 Shell Programming and Scripting 6 03-10-2008 02:57 PM

All times are GMT -4. The time now is 08:47 AM.