BASH: while true to "read" a file
Jog my memory somebody -- Google evidently has no idea what I mean.
I had a script once that had in it a while true; do and read lines or data from a file similarly to a while read; do. I have a script I'm working on now where I'm trying to "prove the negative" that certain substrings culled from one file do not appear in another file. I'll try to explain what I mean with an example. An item in one list might be Code:
harvey1998nicks211.jpg Code:
harvey1996nicks:Six stores in north London The furthest I've bothered to go in the direction of "proving the negative" is a slow "if/then/fi" loop that looks like this: Code:
linecheck=$[linecheck+1] I have the strong feeling that either a while true do or a better-written if/then/fi loop is what I'm looking for. If there are other methods, I'll certainly entertain any suggestions in that direction. BZT |
It was a case for "case"
The code that saved the day:
Code:
case "$matchX" in Code:
sort -t"/" -k6 -u nomatches.txt -o notamatch.txt BZT |
All times are GMT -5. The time now is 04:40 PM. |