Sponsored Content
Top Forums Shell Programming and Scripting SED/AWK maybe PERL in a WHILE loop Post 302637419 by Corona688 on Tuesday 8th of May 2012 10:53:34 PM
Old 05-08-2012
Why should perl, awk, sed, anything understand that you want the 99,9999 regexes you didn't give it instead of the single regex you did? You'll have to load them all into awk or perl at once somehow.

Working on something.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed with awk in loop

Hi Guys, I am using following code to do some task. Can somebody please help me to use a for loop for this ? ___________________________________________________ sed s/DATA2/`awk '/ / {print $1}' formated1`/ EOD_Batch > EOD_Batch1 sed s/DATA3/`awk '/ / {print $2}' formated1`/ EOD_Batch1 >... (4 Replies)
Discussion started by: manchau
4 Replies

2. Shell Programming and Scripting

Use loop in sed or awk?

I know a little bit of sed and awk, but not too much. can loop be done in sed. Baiscally what I want is: file1: aaa 111 bbb 222 ccc 333 ddd 444 eee 555 fff 666 Note: the space in between is "tab" file2: bbb ddd eee I want delete any entries in file1... (4 Replies)
Discussion started by: redstone
4 Replies

3. Shell Programming and Scripting

Question related to sed or awk or perl

Hi All, I have a big file of 100,000 lines with the following format: 1,736870,736870,1,2,5,547,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445 1,881246,881246,1,2,6,402,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445... (4 Replies)
Discussion started by: toms
4 Replies

4. Shell Programming and Scripting

How to remove spaces using awk,sed,perl?

Input: 3456 565 656 878 235 8 4 8787 3 7 35 878 Expected output: 3456 565 656 878 235 8 4 8787 3 7 35 878 How can i do this with awk,sed and perl? (10 Replies)
Discussion started by: cola
10 Replies

5. Shell Programming and Scripting

Getting the first word using sed,awk or perl

Input: root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4: tty:x:5: disk:x:6: lp:x:7: mail:x:8: Output: root daemon bin sys adm tty (8 Replies)
Discussion started by: cola
8 Replies

6. Shell Programming and Scripting

Deleting the first column with sed,awk or perl

336 brtr 256 hello Output: brtr hello How can i do this with sed,awk or perl? (5 Replies)
Discussion started by: cola
5 Replies

7. Shell Programming and Scripting

Deleting characters with sed,perl,awk

Input: :: gstreamer :: xine-lib :: xine-lib-extras Output should be: gstreamer xine-lib xine-lib-extras How can it be done with sed or perl? (12 Replies)
Discussion started by: cola
12 Replies

8. Shell Programming and Scripting

awk sed perl??

Hi guys First of all a salute to this wonderful platform which has helped me many a times. Im now faced with something that I cannot solve. I have data like this 11:14:18 0.46975 11:14:18 0.07558 11:14:18 0.00020 11:14:18 0.00120 11:14:18 0.25879 11:14:19 0.00974 11:14:19 0.05656... (13 Replies)
Discussion started by: jamie_123
13 Replies

9. Shell Programming and Scripting

Modify the file with awk,sed or perl

Hi All, I need help from any of you.Would be so thankful for your help. I/P DDDD,1045,161,1557,429,1694,800,1911,1113,2460,1457,2917> 1609,3113,1869,3317,2732,3701,3727,4132,5857,5107> 9004,6496 DDDD,1125,157,1558,429,1694,800,1911,1117,2432,1444,2906>... (2 Replies)
Discussion started by: Indra2011
2 Replies

10. Shell Programming and Scripting

Replace my perl with awk or sed

My code below will print only the email address from all lines. I want to convert it with sed or awk.. also what if i just want to find only filenames. cat LIS_EMAIL | perl -wne'while(/+@+\w+/g){print "$&\n"}' Hoping to extract the filename such us .exe, .bin. From file that has scrambled... (8 Replies)
Discussion started by: invinzin21
8 Replies
TXT2REGEX(1)						      General Commands Manual						      TXT2REGEX(1)

NAME
txt2regex - a Regular Expression Wizard, written with bash2 builtins SYNOPSIS
txt2regex txt2regex --nocolor|--whitebg txt2regex --all|--prog <p1,p2,...,pN> txt2regex --showmeta|--showinfo <program> txt2regex --make <target> txt2regex --history <value> DESCRIPTION
txt2regex is a Regular Expression "wizard", all written with bash2 builtins, that converts human sentences to regexes. With a simple interactive interface, you just answer to questions and build your own regex for a large variety of programs, like awk, emacs, grep, perl, php, procmail, python, sed and vim. There are more than 20 supported programs. It's bash so download and run, no compilation needed. Please visit the program homepage at http://txt2regex.sf.net. OPTIONS
--all works with all registered programs --help prints the help message and quit --history <value> prints to STDOUT a regex from a history data --make <target> prints a ready regex for a common pattern --nocolor self-explanatory --prog <p1,p2,...> choose which programs to use (separated by commas) --showinfo <program> prints regex info about the program --showmeta prints a complete metachar table for all programs --version prints the program version and quit --whitebg colors adjusted to white background terminals By default, all options are turned OFF. Just call it with no options to launch the default interactive interface. DETAILS
--all is cool but requires lots of lines (~35) --nocolor is strong, so it kills --whitebg --showmeta rules, try it --showinfo uses reverse video output, --nocolor turns it off --history is getting useful, stay tunned --make is a remedy for headaches --prog is nice to use your favorite programs, mix it with --make and --history EXAMPLES
Calling the program on the default interactive interface $ txt2regex Calling the program on a white terminal $ xterm -fg black -bg white ; txt2regex --whitebg Getting information $ txt2regex --showmeta Getting specific information $ txt2regex --showinfo sed Calling it for specific programs $ txt2regex --prog vim,sed,grep,python Applying a history data $ txt2regex --history '16421x:01x:' Getting ready regexes! $ txt2regex --make hour $ txt2regex --make number3 --prog perl $ txt2regex --make date2 --all INTERFACE
The program interface is simple and easy to use. This is its contents: +---------------------------------------+ | -> Top menu | | -> Group menu | | | | -> Regexes of the programs selected | | ... | | ... | | | | -> History | | -> Your prompt | | | | -> The question | | -> The answers | | ... | | ... | +---------------------------------------+ All the basic commands can be used on the numeric pad on the keyboard, but remember to turn ON the NumLock key. Command Description . Quit the program (with confirmation) 0 Reset the Regular Expression 1-9 Answers the questions * Toggles color ON/OFF / Add/remove programs on/from the list | Insert an alternation (where allowed) ( Open a new group (where allowed) ) Close the opened group (if any) BUGS
Bug reports and contributions are VERY welcome! Please send them to the author. AUTHOR
Written and maintained by Aurelio Marinho Jargas <verde@aurelio.net> COPYRIGHT
Copyright (C) 2000, 2001, 2002, 2003, 2004 Aurelio Marinho Jargas This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. September, 28th - 2004 TXT2REGEX(1)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy