Sponsored Content
Full Discussion: Sed filter words from string
Top Forums Shell Programming and Scripting Sed filter words from string Post 302452024 by rdcwayx on Thursday 9th of September 2010 01:19:53 AM
Old 09-09-2010
Code:
echo "sstring garbage adfsdf tab.col1 lkad rjfj tab2.col2 adja tab2.col4 garbage" |grep -o "[[:graph:]]*\.[[:graph:]]*"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

filter the string from a file ??

I have a file in which there are strings given below: inode 1138932c(mqsiadm) inode 1257904c(mqsiadm) I want to get the nos. only form these. The o/p should be 1138932 1257904 How to filter this out ?? (11 Replies)
Discussion started by: varungupta
11 Replies

2. UNIX for Advanced & Expert Users

How to filter the words, if that word contains the expected letter

Hi, I am trying to filter the words from a file which contain 'abc'. But I am unable to. Could any one help me. For eg: The file contents are 123ab 12hnj1 123abc456 123cgbcahjkf23 23134abchfhj43 gc32abc abc1 2abc3 sd uiguif fhwe 21242 uh123 jkcas124d123 u3hdbh23u ffsd8 Output... (3 Replies)
Discussion started by: venu_eie
3 Replies

3. Shell Programming and Scripting

Filter NOT words

Hi, I have string like this (for example) $str="orange AND grapes NOT pineapple"; $str="orange AND grapes NOT pineapple AND papaya"; $str="orange AND grapes NOT pineapple AND jackfruit NOT "fruit juice""; I have to filter out NOT terms. How can i do that? I used this... (3 Replies)
Discussion started by: vanitham
3 Replies

4. Shell Programming and Scripting

[sed] extract words from a string

Hi, One of the scripts creates logs in the format: progname_file1.log.20100312020657 where after file the number could be from 1 to 28 and after log. the date is attached in the format YYYYMMDDHHMISS progname_file<1-28>.log.YYYYMMDDHHMISS. Now I want to discard the .20100312020657... (7 Replies)
Discussion started by: dips_ag
7 Replies

5. Shell Programming and Scripting

SED - delete words between two possible words

Hi all, I want to make an script using sed that removes everything between 'begin' (including the line that has it) and 'end1' or 'end2', not removing this line. Let me paste an 2 examples: anything before any string begin few lines of content end1 anything after anything before any... (4 Replies)
Discussion started by: meuser
4 Replies

6. UNIX for Dummies Questions & Answers

Filter a particular string

Hi, I have a long log file. Out of which I want to filter particular occurrences where APC=4-033-0. Please help how it can be done. Input : +++ ELEMENT 12-05-27 23:15:06 CC 3482 #040185 > REPT APB TPE=C7NTL SM=22 OPC=4-003-7 APC=4-033-4 inaccessible END OF REPORT #040185 ++- ... (7 Replies)
Discussion started by: vanand420
7 Replies

7. UNIX for Dummies Questions & Answers

Filter logs for key words and create an index

well, im a total novice of unix commands and shell scripting, i never made anything. But yesterday in my work i was working with a lot of log files and i was wondering if there is a command for doing something like this: i have a bunch of files with text like this: blablabla errorcode1... (11 Replies)
Discussion started by: matius_88
11 Replies

8. Shell Programming and Scripting

Perl script to filter the string

Hi folks, I have a log file with the lines in the below format. Jul 1 23:00:51 10.212.3.251 SS: %SYS-7-CLI_SCHEDULE: some error occured I want to split the line based on the " %SYS-7-CLI_SCHEDULE: " value. The criteria is the should store the word that starts with % i.e., ... (1 Reply)
Discussion started by: scriptscript
1 Replies

9. Shell Programming and Scripting

Filter all the lines with minimum specified length of words of a text file

Hi Can someone tell me which script will work best (in terms of speed and simplicity to write and run) for a large text file to filter all the lines with a minimum specified length of words ? A sample script with be definitely of great help !!! Thanks in advance. :) (4 Replies)
Discussion started by: my_Perl
4 Replies

10. Shell Programming and Scripting

Need to filter string between specific string in ksh

My argument has data as below. 10.9.9.85 -rwxr-xr-x user1 2019-10-15 17:40 /app/scripts/testingscr5.scr 127869538 -rwxr-xr-x user1 2019-10-15 17:40 /app/scripts/testingscr56scr 127869538 ....... (note all these between lines will start with hyphen '-' ) -rwxr-xr-x user1 2019-10-15 17:40... (3 Replies)
Discussion started by: mohtashims
3 Replies
APGBFM(1)							    User Manual 							 APGBFM(1)

NAME
apgbfm - APG Bloom filter management program SYNOPSIS
apgbfm -f filter -n numofwords [-q] [-s] apgbfm -f filter -d dictfile [-q] [-s] apgbfm -f filter -a word [-q] apgbfm -f filter -A dictfile [-q] apgbfm -f filter -c word [-q] apgbfm -f filter -C dictfile [-q] apgbfm -i filter apgbfm [-v] [-h] DESCRIPTION
apgbfm is used to manage Bloom filter that is used to restrict password generation in APG pasword generation software. Usage of the Bloom filter allows to speed up password check for large dictionaries and has some other benefits. The idea to use Bloom filter for that purpose is came from the description of the OPUS project OPUS: Preventing Weak Password Choices Pur- due Technical Report CSD-TR 92-028 writen by Eugene H. Spafford. You can obtain this article from: http://www.cerias.purdue.edu/homes/spaf/tech-reps/9128.ps It has very nice description of Bloom filter and it's advantages for password checking systems. In simple words, apgbfm generates n hash values for every word and sets corresponding bits in filter file to 1. To check the word apgbfm generates the same hash functions for that word and if all n corresponding bits in filter file are set to 1 then it suppose that word exists in dicionary. apgbfm uses SHA-1 as a hash function. apgbfm can be used as standalone utility, not only with apg, or apgd. WARNING !!! Filter file format can be changed in the future. I'll try to make file formats compatible but i can not guaranty this. WARNING !!! apgbfm may slow down your computer during filter creation. OPTIONS
-f filter use filter as the name for Bloom filter filename. -i filter print information about filter. -n numofwords create new empty filter for numofwords number of words. Useful when you want to fill filter dynamicaly. -d dictfile create new filter from dictfile. It may take a lot of time to generate filter from a big dictionary. In that dictionary you may place words (one per line) that should not appear as generated passwords. For example: user names common words, etc. You even can use one of the dictionaries that come with dictionary password crackers. This check is case sensitive. For example, if you want to reject word 'root', you should insert in dictfile words: root, Root, RoOt, ... , ROOT. To indicate that program is working apgbfm prints dot for every 100 words added in dictionary. -a word add word to the filter. -A dictfile add all words from dictfile to the filter. To indicate that program is working apgbfm prints dot for every 100 words added in dic- tionary. -c word check word for appearance in the filter. -C dictfile check every word from dictfile for appearance in the filter. -q quiet mode. -s create new filter in case-insensitive mode. -v print version information. -h print help information. EXIT CODE
On successful completion of its task, apgbfm will complete with exit code 0. An exit code of -1 indicates an error occurred. Textual errors are written to the standard error stream. FILES
None. BUGS
None. If you've found one, please send bug description to the author. This man page is Alpha too. SEE ALSO
apg(1) AUTHOR
Adel I. Mirzazhanov, <a-del@iname.com> Project home page: http://www.adel.nursat.kz/apg/ Automated Password Generator 2003 Jun 19 APGBFM(1)
All times are GMT -4. The time now is 06:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy