Sponsored Content
Top Forums Shell Programming and Scripting Simple ways to pass variations to grep Post 302651287 by Scrutinizer on Tuesday 5th of June 2012 09:38:49 AM
Old 06-05-2012
At any rate leave out the grouping operators ( ... ) , they seem to really slow things down...
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to pass variable to grep?

Hi I have a such conditional: SPAMH="it is SPAM" if grep -q $SPAMH $NMDIR/$mail; then SPAMHFLAG=1 else SPAMHFLAG=0 fi And grep doesn't catch this string, even it exists there. I think it's a problem with passing $SPAMH to grep. I tried... (2 Replies)
Discussion started by: xist
2 Replies

2. UNIX for Dummies Questions & Answers

Grep or other ways to output line above and/or below searched line

Hi all, Would like to know how I could search for a string 'xyz' but have the output show the line plus the line above and/or below all lines found. eg. search for xyz from file containing: abc 12345 asdf xyz asdfds wwwww kjkjkj ppppp kkkxyz eeee zzzzz and the output to... (2 Replies)
Discussion started by: sammac
2 Replies

3. Shell Programming and Scripting

Simple grep Question

I tried searching for answers but didn't find any. When I grep a file results read 4.2.2.2 4.4.4.2 4.5.6.7 But I just want to select each result individually. For Example I want to be able to say variable1="first grep result" variable2="second grep result" variable3="third grep... (8 Replies)
Discussion started by: elbombillo
8 Replies

4. UNIX for Dummies Questions & Answers

Simple grep question

This should be so easy... I want to find all the apps in /Applications that start with the lower case i (e.g. iTunes.app, iSync.app, iCal.app) They should all have the .app extension. I've tried: ls /Applications |grep -o i*.app ls /Applications/i*.app Anyhow, I just want to see what apps... (2 Replies)
Discussion started by: glev2005
2 Replies

5. Shell Programming and Scripting

script to include filename with variations at the beginning of the file

Hi there, I have a bunch of files that I want to modify. As a beginner, but nevertheless enthusiast, in the use of the shell I want to create a script enabling me to modify those files quickly. I had only some partial success with various peaces of scripts but I would like to create one script... (1 Reply)
Discussion started by: iamzesh
1 Replies

6. UNIX for Dummies Questions & Answers

Printing all 'case' variations of a word

Hey Guys & Gals, I am trying to figure out how one would go about printing all possible variations of letter cases in a given word. So if for instance given the input "test123" output would be ; test123 Test123 TEst123 TESt123 TEST123 tEst123 tESt123 tEST123 teSt123 teST123... (1 Reply)
Discussion started by: TAPE
1 Replies

7. UNIX for Dummies Questions & Answers

Pass grep's Output to mv?

Hi! I was looking for files to clean out, and I remembered reading somewhere that you could pipe the output of grep to rm. But I prefer to mv stuff to ~/.Trash/ I thought I'd try something like this: ls ~/Library/Preferences/ |grep '.*.\.iTunes\.plist\..*' |xargs -J % mv % ~/.Trash/ I... (12 Replies)
Discussion started by: sudon't
12 Replies

8. What is on Your Mind?

Variations on a theme...

Well you lot seriously amaze me. There was a thread a few hours ago, (on the date stamp shown in this upload), that generated loads of solutions to a fairly simple problem:- https://www.unix.com/shell-programming-scripting/235829-how-print-particular-character-n-number-times-line.html As a... (0 Replies)
Discussion started by: wisecracker
0 Replies

9. Shell Programming and Scripting

sed Command new Line not working Tried many variations

Hi I have assigned an output of a command to $I. I try to print the input and put a new line after occurrence of the hostname which is assigned to $HOST1 ( Example: pwrm16 ) . First of all I need to get rid of the Colon after the host name pwrm16: and make it pwrm16 then I want to print the... (10 Replies)
Discussion started by: mnassiri
10 Replies

10. Shell Programming and Scripting

Remove matching pattern on each line with number variations

Hello folks! I have a file containing lines like this Something text 18:37Remove This: 1,111"Keep this text" Some more text 19:37Remove This: 222"Keep this text" More text 20:50Remove This: 3,333Keep this text And more text 25:50Remove This: 44,444Keep this text I would like to... (4 Replies)
Discussion started by: martinsmith
4 Replies
SBNI(4) 						 BSD/i386 Kernel Interfaces Manual						   SBNI(4)

NAME
sbni -- Granch SBNI12 leased line modem driver SYNOPSIS
device sbni DESCRIPTION
The sbni driver provides support for leased line modems of following models: o SBNI12-02, SBNI12D-02 o SBNI12-04, SBNI12D-04 o SBNI12-05, SBNI12D-05, ISA and PCI o SBNI12-10, SBNI12D-10, ISA and PCI and a kit for data link over a voice band: o SBNI12-11, SBNI12D-11, ISA and PCI. In addition to the standard port and IRQ specifications, the sbni driver also supports a number of flags which can set baud rate, receive level, and low three bytes of Ethernet MAC-address (high three are always 00:ff:01), because Granch modems are presented to the system as Ethernet-like network cards. The high byte of the flags is a bit field, it is used to specify SBNI adapter receive level/baud rate: Bits 0-3: receive level (0x00..0x0f) Bits 4-5: baud rate number: 00 - 0 baud rate (2Mb in fast mode/500kb in slow) 01 - 1 baud rate (1Mb/250kb) 10 - 2 baud rate (500kb/125kb) 11 - 3 baud rate (250kb/62.5kb) Bit 6: use fixed receive level if bit 6 is set then receive level will be set according to bits 0-3 value, otherwise receive level will be autodetected Bit 7: use fixed baud rate if bit 7 is set then baud rate will be set according to bits 4-5 value, otherwise baud rate is set to 2Mb FILES
The sources for the driver reside in: /sys/dev/sbni/if_sbni.c /sys/dev/sbni/if_sbnireg.h /sys/dev/sbni/if_sbnivar.h SEE ALSO
arp(4), netintro(4), ifconfig(8) HISTORY
The sbni device driver first appeared in FreeBSD 4.6. AUTHORS
The sbni device driver for FreeBSD 4.x was written by Denis I. Timofeev, partially based on David Greenman's ed(4) driver. Earlier versions (available on ftp.granch.com) were written by Alexey V. Zverev. SBNI12 hardware was designed by Alexey V. Chirkov. BSD
January 8, 2002 BSD
All times are GMT -4. The time now is 02:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy