Sponsored Content
Full Discussion: Compatible awk command
Top Forums Shell Programming and Scripting Compatible awk command Post 302995761 by SkySmart on Tuesday 11th of April 2017 11:12:03 PM
Old 04-12-2017
it doesnt look like awk is going to be reliable here. but sed seems to be.

i found this command online:

Code:
sed -n '/ABC/,/^[^+]/{x;/^$/!p;}' file

and i modified it to look like this:

Code:
sed -n '/^First/,/^End$/ {x ; /#\/bin\/sh|not.*commonly|#/!p;}'

which seems to work. but dont know if im reading the command correctly. i take it, im storing everything between and including lines from "First" to "End" to variable x. then, im only printing lines from variable x which do not contain the strings
Code:
#\/bin\/sh|not.*commonly|#

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Print Servers compatible with Solaris

Does anyone have any advice on what print servers to use with Solaris I used to use intel but they dicontinued the model we used. I would just use lpadmin to set them up . Any advice on this would be very helpful. (2 Replies)
Discussion started by: xmildx
2 Replies

2. Linux

VPN compatible with NAT

Hey, i was wondering if anybody knew of a good VPN that is compatible with nat? If a VPN will not work with NAT could it work with PAT? Right now i'm using RH9. I wanted to use IPsec but i don't think that is compatiable with nat or pat. Please correct me if i'm wrong. Thanks, Byblyk. (0 Replies)
Discussion started by: byblyk
0 Replies

3. Linux Benchmarks

Gd2 not compatible with Clientexec

Dear Frnds We are having WHM Cpanel in which many website are their , one of our customer want to install Clientexec software which requires GD2.0.28(compatible) library which is installed. The problem is libpng version which is incompatible with the GD library . Please kindly... (0 Replies)
Discussion started by: naik_mit
0 Replies

4. Solaris

Compatible NICs for Solaris 9 (9/05) x86

Hi, Please can someone recommend me a cheap PCI Network card for Solaris 9 (9/05) for an Intel based PC (x86). I currently have a US Robotics NIC installed, but Solaris does not recognise it and its been too much hassle to find drivers for it etc, so have decided to purchase another NIC that... (3 Replies)
Discussion started by: wajidc
3 Replies

5. UNIX for Dummies Questions & Answers

winzip compatible command

Dear friends, I m new to Unix, can anybody please guide me on how to zip and password protect a normal text (or any file) in unix prompt? (1 Reply)
Discussion started by: topgear1000cc
1 Replies

6. Shell Programming and Scripting

awk command in script gives error while same awk command at prompt runs fine: Why?

Hello all, Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val: > cat getnon0file.sh #!/bin/bash this="getnon0file.sh" USAGE=$this" InFile="xyz.38" Min="0.05" # awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies

7. Hardware

is rhel 6 compatible with dell xps 14

is rhel 6 compatible with dell xps 14.I tried to install it but could not install.Installation hanged at detecting hardware (1 Reply)
Discussion started by: shamapraveen
1 Replies

8. Hardware

Trying to find a compatible OS for an old computer

Hello A friend and I recently got our hands on an old computer (a rainbow '83 I think), cleaned it, etc... And now we're trying to get the thing running. The problem is that the included OS is badly documented, so I thought of installing an old version of UNIX on it. So the questions are: Is that... (8 Replies)
Discussion started by: ijiboom
8 Replies

9. Shell Programming and Scripting

Looking for a perl-compatible regex solution

This is for PHP preg_match code - which is PCRE therefore looking for a perl compatible suggestion I have this line returned I want to match and return.. I want to match the two instances of string ending 'ABCXYZ' into an array. And on second element (ie. RootABCXYZ) only return the word... (4 Replies)
Discussion started by: deadyetagain
4 Replies

10. UNIX for Dummies Questions & Answers

Vim compatible

I have ubuntu 32 bit installed on VMware with win 7 as host operating system. I am a newbie to Linux shell mode and vi editor. When ever I open the vi editor and select insert mode I don't see the insert mode being highlighted at the bottom of the screen as it is supposed to be. Only when I enable... (4 Replies)
Discussion started by: sabsac
4 Replies
scrl(3XCURSES)						  X/Open Curses Library Functions					    scrl(3XCURSES)

NAME
scrl, scroll, wscrl - scroll a window SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] #include <curses.h> int scrl(int n); int scroll(WINDOW *win); int wscrl(WINDOW *win, int n); PARAMETERS
n number and direction of lines to scroll win pointer to the window in which to scroll DESCRIPTION
The scroll() function scrolls the window win up one line. The current cursor position is not changed. The scrl() and wscrl() functions scroll the window stdscr or win up or down n lines, where n is a positive (scroll up) or negative (scroll down) integer. The scrollok(3XCURSES) function must be enabled for these functions to work. RETURN VALUES
On success, these functions return OK. Otherwise, they return ERR. ERRORS
None. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
clearok(3XCURSES), libcurses(3XCURSES), attributes(5), standards(5) SunOS 5.11 5 Jun 2002 scrl(3XCURSES)
All times are GMT -4. The time now is 03:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy