

InterviewSolution
Saved Bookmarks
1. |
Solve : need a script? |
Answer» Hello, I need a bash script for the following situation: I have a text file and I need to extract every LINE that contains the expression "ORA-" and the line above it. I would like the result to be redirected to a separate file named result.txt. Any help is apreciated. I am a beginer in shell scripting.This forum. This forum. Nope. Read the POST, he wrote "bash script". Quote from: Dias de verano on February 03, 2009, 04:10:45 AM Quote from: BatchRocks on January 31, 2009, 08:16:55 PMThis forum. I'll say LOL now, rather then after whatever BatchRocks posts NEXT in this thread. It's a one-liner... grep -B1 "ORA-" yourtextfilenamehere | grep -v ^\-\- > result.txt |
|