Search Results

Search: Posts Made By: freyr
2,304
Posted By vgersh99
The condition FNR==NR will be true only for the...
The condition FNR==NR will be true only for the FIRST file passed to awk for processing. Therefore, we read file2 into hash FIRST - then proceed with the processing for the other/file1 files.
4,903
Posted By Franklin52
/^[0-9]{2}\//{f=0} If the first 2 characters...
/^[0-9]{2}\//{f=0}

If the first 2 characters of the line are numeric and the third character is a slash (the next date) assign 0 to the variable f.
4,903
Posted By danmero
awk 'BEGIN{printf("Enter the date : "); getline...
awk 'BEGIN{printf("Enter the date : "); getline date < "-"} $0 ~ date{f=1}!NF{f=0}f' file
Showing results 1 to 3 of 3

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