Perhaps if Grigor provided examples of where your command fails? :)
(The first 5 lines might work fine)
However, one failure might be that your commands assume that every line
he's likely to
want to delete has 30 (or 9, in your example) or more characters.
I.e., if trailing white space has been stripped, a "blank" line (which he
might consider as
one that ought to be deleted) might not match most pattern matching. T
he sed pattern will fail to match short lines.
When I encounter this particular problem, I use QEDIT for HP-UX ...
I find it easy to delete such lines, although even then there are
sometimes "gotchas".
Stan
On Fri, Apr 29, 2016 at 5:12 PM, Barry Lake <[log in to unmask]> wrote:
> On 4/29/16 1:13 PM, krikor Gullekian wrote:
>
>> Thanks for the info, but that is the first thing I tried and it didn't
>> work, that is why I was wondering.
>>
>
> Perhaps if you were to provide us with the exact command you tried
> (copy/paste, don't re-type it), as well as any errors or other messages,
> along with the output produced, and maybe a "head -5" of the file you're
> working on, then we could see what's going on.
>
> And/or, perhaps if you were to copy/paste the sed command from my previous
> post into your linux environment, rather than type it out, then you'd find
> that it works.
>
> But if you're using any version of sed that has been produced in the last
> 15 or 20 years, then the pattern match that I provided will work. I tried
> it on the newest linux available, and I tried it on a 15 year old version
> of HP-UX. Heck, I even tried it in the MPE/iX posix shell. It works the
> same everywhere.
>
> Barry
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|