Sponsored Content
Full Discussion: Select a pattern from file
Top Forums Shell Programming and Scripting Select a pattern from file Post 302332826 by DTechBuddy on Friday 10th of July 2009 06:54:39 AM
Old 07-10-2009
Not solved yet.

I tried this command:-

cat FileName | sed -e 's#<ABC>[0-9]\+</ABC>##g'

It's not working.
No effect on my FileName. Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to select lines in unix matches a pattern at a particular position

I have huge file. I want to copy the lines which have first character as 2 or 7, and also which has fist two characters as 90. I need only these records from file. How I can acheive this. Can somebody help me..... (2 Replies)
Discussion started by: cs_banda
2 Replies

2. Shell Programming and Scripting

extract/select pattern from input

Hey, examples of the input (text line): /bla/blMOasdn234.adanif24/blabla.rar /bla/blMOasdn234.adanif24/blabla23124.bin /bla/bla/bla/bla/bla/bla.bin and what I need to do is extract/select only the dir path so the output would be: /bla/blMOasdn234.adanif24/ /bla/blMOasdn234.adanif24/... (4 Replies)
Discussion started by: TehOne
4 Replies

3. Shell Programming and Scripting

Select everything before a pattern

Hi I have i doubt, actually i have to select everything before a word(pattern).For that i am using sed i am using the below line of code but it is not working i am getting a blank instead.. sed -n '/regexp/{g;1!p;};h' file1 Can anyone help? Thanks (15 Replies)
Discussion started by: usha rao
15 Replies

4. Shell Programming and Scripting

select some text from a test dependng on pattern

I have some absolute file location $INSTALL_BASEPATH/onereview-5.0/resources/commons-messages/commonmessages_default.properties $INSTALL_BASEPATH/onereview-5.0/orv-deploy/config-console.war/WEB-INF/classes/com/connectiva/configuration/console/resource/configurationBundle.properties I need to... (3 Replies)
Discussion started by: mnmonu
3 Replies

5. Shell Programming and Scripting

Select everything between first and last occurrence of same pattern

Greetings, I am writing a script which requires as a part, selecting all the lines between the first and last occurrence of a pattern. I have an nawk alternative that is working. But thre should be a generic script that should run on all os viz, linux, sun , aix. The awk script that i... (25 Replies)
Discussion started by: usha rao
25 Replies

6. Shell Programming and Scripting

Select only the last line from the pattern

Hi, I am really new in the shell script, but it is really useful for me to learn. I have one question, I have a large text document (actually few of them), inside there are lines with information about energies, between 10 to 20 of this lines, varies from one doc to another one, my questions... (11 Replies)
Discussion started by: hmartine1983
11 Replies

7. Shell Programming and Scripting

Search for a pattern in a String file and count the occurance of each pattern

I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported Input file is a free flowing file without any format example of output ERR-00001=5 .... ERR-01010=10 ..... ERR-99999=10 (4 Replies)
Discussion started by: swayam123
4 Replies

8. Shell Programming and Scripting

Modifying the shell script to select pattern

Hello, I have script which work 70% of the desired task , the output from script.sh is following , however the desired output I require is following . Any piece of suggestion would be great.. thanks in advance, emily #!/bin/bash ... (8 Replies)
Discussion started by: emily
8 Replies

9. Shell Programming and Scripting

Big pattern file matching within another pattern file in awk or shell

Hi I need to do a patten match between files . I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time. Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies

10. Shell Programming and Scripting

How do I select certain columns with matching pattern and rest of the lines?

I want to select 2nd, 3rd columns if line has "key3" and print rest of the lines as is. # This is my sample input key1="val1" key2="val2" key3="val3" key4="val4" some text some text some text some text key1="val1" key2="val2" key3="val3" key4="val4" some text some text some text some... (3 Replies)
Discussion started by: kchinnam
3 Replies
STYX(1) 						      General Commands Manual							   STYX(1)

NAME
styx -- A combined parser and scanner generator SYNOPSIS
styx [-diagnose] [-verbose] [-makeC] [-makeIMG] [-makeINT] [-shortform] [-BINSTYX=directory] [-GENSTYX=directory] [-SPESTYX=direc- tory] language stypp [-charset=string] [-wprint] [-prepar=string] [-premac=string] [-prefun=string] [-Start=string] [-xaron] [-early] [-shift- fun=string] [-reducefun=string] [-ppfun=string] [-BINSTYX=path] srclang tgtlang filename stydoc [-StyxPath=path] [-Template=path] [-RefAlias=string] [-recursiv] [-prodcom] [-keepNTs=string] [-noClass=string] [-exProds=string] [-ignRRef=string] [-BINSTYX=path] grammarfile outfile ctoh [-ct] [-force] [-CPATH=path] [-HPATH=path] [-PRJ=path] [-DPATH=path] [-DROOT=path] ptm_img [-FileName=path] [-charset=string] [-skipset=string] [-binmode] [-wprint] [-prepar=string] [-premac=string] [-prefun=string] [-Start=string] [-xaron] [-early] [-shiftfun=string] [-reducefun=string] [-BINSTYX=path] language image lim_test [-charset=string] [-binmode] [-wprint] [-prepar=string] [-premac=string] [-prefun=string] [-tokens] [-symbols] [-BIN- STYX=path] language filename pim_test [-charset=string] [-binmode] [-wprint] [-prepar=string] [-premac=string] [-prefun=string] [-Start=string] [-xaron] [-early] [-shiftfun=string] [-reducefun=string] [-tree] [-BINSTYX=path] language filename DESCRIPTION
This manual page documents briefly the styx, stypp, stydoc, ctoh, lim_test and pim_test commands. It was written for the Debian GNU/Linux distribution because the original programs don't have manual pages, but have documentation in HTML format (see below). styx translates token and syntax descriptions contained in $SPESTYX/language.sty yielding scanner and parser tables as well as a functional interface to the abstract derivation tree. stypp is sort of a ``pretty printer'' for source files written in a styx-defined language. Furthermore it can be used to port source files, provided source and target languages have equivalent abstract syntax. stydoc generates HTML reference documentation for a grammar specified in grammarfile using a template. ctoh is used to create header files from C sources generated by styx. It is taken from the upstream author's own project development envi- ronment where source files are written in a manner allowing interface definitions to be automatically generated. ptm_img translates a source file specified by the FileName option to a binary image. If the FileName option is omitted, the image file must exist and the program writes the derivation tree to stdout. lim_test uses a scanner image file for language to scan the source in filename writing the token stream to stdout. pim_test uses scanner and parser image files for language to parse the source in filename writing the derivation tree to stdout. ENVIRONMENT
Upstream authors use non-standard conventions for command-line options and environment variables, to the effect that the latter are best viewed as options which default to the value of the identically named environment variable if not specified. For styx, SPESTYX is the search path for language specifications (language.sty), scanner and parser image files are located using BINSTYX while the location of generated C code is determined by GENSTYX. stypp, stydoc, ptm_img, lim_test and pim_test use BINSTYX to locate scanner and parser image files language.lim and language.pim. SEE ALSO
The programs are documented fully in The Styx Handbook available in the source distribution in LinuxDoc and HTML format. On Debian GNU/Linux systems the documentation is contained in the styx-doc package. AUTHOR
This manual page was written by Siggy Brentrup <bsb@debian.org> for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. STYX(1)
All times are GMT -4. The time now is 01:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy