195 reputation
211
bio website
location Chipley, FL
age
visits member for 2 years, 10 months
seen Mar 10 at 23:10

Sep
30
revised AIX sed parsing error 0602-404 but works with Linux sed?
Added the complex sed
Sep
30
comment AIX sed parsing error 0602-404 but works with Linux sed?
I'm trying to do a check and store the results for an if statement in a script. I added that part. I don't want to do a substitution in the file. This: sed -n '/^ERROR:/,$p' $RESULTSFILE gave me the results I wanted but I'm having trouble doing it to a more complex sed.
Sep
30
revised AIX sed parsing error 0602-404 but works with Linux sed?
Edited the echo to print to the file, and the results var.
Sep
30
revised AIX sed parsing error 0602-404 but works with Linux sed?
Edited the echo to print to the file.
Sep
30
comment AIX sed parsing error 0602-404 but works with Linux sed?
I've figured it out and because I can't answer my own question yet I decided to add the answer here. The print var is different in AIX instead of Linux the correct way would be to do the following. sed -n '/^ERROR:/,$p' $RESULTSFILE
Sep
30
asked AIX sed parsing error 0602-404 but works with Linux sed?
Sep
26
awarded  Scholar
Sep
26
accepted Regex for sed to grab multiple lines or a better way?
Sep
26
comment Regex for sed to grab multiple lines or a better way?
Interesting thank you for explaining that I didn't know about sed addresses and how they worked I'll have to do reading about it.
Sep
24
revised Regex for sed to grab multiple lines or a better way?
Added what output I am looking for.
Sep
24
comment Regex for sed to grab multiple lines or a better way?
Thats nice and clean but it's also including the dashes and the disconnected line. I have to run lines=wc -l; sed -n '2;$lines {p}' in order to remove them is there a way to group with that sed command?
Sep
24
awarded  Supporter
Sep
24
comment Regex for sed to grab multiple lines or a better way?
This worked well, I modified it to grab just the text excluding the dashes and the Disconnect as well as the blank line before Disconnected and after the dashes. sed -n '1h;1!H;${;g;s/.*(-\{80\}\n(.*)\nDisconnected.*/\1/p;}' file
Sep
24
awarded  Student
Sep
24
asked Regex for sed to grab multiple lines or a better way?
Sep
7
awarded  Tumbleweed
Aug
31
awarded  Editor