03-04-2013
DERP
That did it. It works beautifully now. Thanks so much. I *should* be able to adapt that to whatever I need for other functions.
*edit*
I'm going to have to work on learning regular expressions to provide some input validation. Don't suppose anyone would like to show me how to make that accept upper/lowercase letters only, would they?
Last edited by LongLeafTea; 03-04-2013 at 06:13 PM..
10 More Discussions You Might Find Interesting
1. Programming
I'm just getting started to lean C and I'm using Ubuntu today I found a tutorial at this site: http://einstein.drexel.edu/courses/CompPhys/General/C_basics/c_tutorial.html and I got an error after compiling the fist code:
#include < stdio.h>
void main()
{
printf("\nHello World\n");
} ... (9 Replies)
Discussion started by: arya6000
9 Replies
2. UNIX for Dummies Questions & Answers
Ok here is the deal, I have a command given to me by some systems guy who I cannot get ahold of on the weekend without paying him alot of money to help me. I need to get this done before Monday as I am just getting pummeled by DOS attacks. The comand given was....
netstat -ntu | awk '{print... (1 Reply)
Discussion started by: Hexabah
1 Replies
3. UNIX for Dummies Questions & Answers
I have a file with 3 digit numbers in it formatted as such:
123
065
321
How would I go about seeing if each number is less than 100 and if so outputting it to another file
Yes, I am a bit of a noob. I have tried with grep but I don't think it'll work.
Any general direction would be... (6 Replies)
Discussion started by: kirkm76
6 Replies
4. Shell Programming and Scripting
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies
5. UNIX for Dummies Questions & Answers
Hello everyone.
i work in a school and i ran into an application today that is a real pickle. i know how to make it work, but i would need to script it. The way to make it work would be to have a script check each local user profile on login, see if the directory already exists, do nothing... (27 Replies)
Discussion started by: jscan
27 Replies
6. UNIX for Dummies Questions & Answers
Hi I'm pretty new to scripting and I've been googling around looking for an answer but have yet to come up with a proper solution. I work with multiple android devices at a time and I'm looking to simplify my life with a script. Basically I'm looking for a script that takes the device ID's and then... (2 Replies)
Discussion started by: Onyoursix
2 Replies
7. Shell Programming and Scripting
Hello. I'm attempting to create a shell script to assist me by saving time with one of my hobbies. I am an Android Enthusiast and currently build a few roms for one of the devices.
One of the roms I make is ported from a different device to mine (I get the original for the HTC Desire HD and... (3 Replies)
Discussion started by: JHutson456
3 Replies
8. Shell Programming and Scripting
Hello,
I am new to shell scripting and i am trying to figure why is this not working with else statement.
I am searching for every directory in that DIR i am in, however the "else" seems to be triggered whenever the run the script..
Much thanks in advance!
#!/bin/shell
for item in... (3 Replies)
Discussion started by: Reb0rn
3 Replies
9. Shell Programming and Scripting
Hello,
I am in a Unix class and have been out of town. I have been tasked to generate a couple of scripts and ahve never done it before. I have a virtual machine running Ubuntu. The task is below
Prompt the system administrator for all valid input parameters
Generate a menu to ask which... (1 Reply)
Discussion started by: jkeeton81
1 Replies
10. Shell Programming and Scripting
Hello All,
I have a file of ip addresses called activeips.txt
What I'm trying to do is run a simple bash script that has a loop in it. The loop is a cat of the IP addresses in the file.
The goal is to run 2 nmap commands to give me outputs where each address in the list has an OS... (11 Replies)
Discussion started by: Dirk_Pitt
11 Replies
dlg(1) PCCTS Manual Pages dlg(1)
NAME
dlg - DFA Lexical Analyzer Generator
SYNTAX
dlg [options] lexical_spec [output_file]
DESCRIPTION
dlg is a tool that produces fast deterministic finite automata for recognizing regular expressions in input.
OPTIONS
-CC Generate C++ output. The output_file is not specified in this case.
-C[ level]
Where level is the compression level used. 0 indications no compression, 1 removes all unused characters from the transition from
table, and 2 maps equivalent characters into the same character classes. It is suggested that level -C2 is used, since it will sig-
nificantly reduce the size of the dfa produced for lexical analyzer.
-m Produces the header file for the lexical mode with a name other than the default name of "mode.h".
-i An interactive, or as interactive as possible, parser is produced. A character is only obtained when required to decide which state
to go to. Some care must be taken to obtain accept states that do not require look ahead at the next character to determine if that
is the stop state. Any regular expression with a Kleene closure at the end is guaranteed to require another character of look
ahead.
-cl class
Specify a class name for DLG to generate. The default is DLGLexer.
-ci The automaton will treat upper and lower case characters identically. This is accomplished in the automaton; the characters in the
lexical buffer are unmodified.
-cs Upper and lower case characters are treated as distinct. This is the default.
-o dir Directory where output files should go (default="."). This is very nice for keeping the source directory clear of ANTLR and DLG
spawn.
-Wambiguity
Warns if more than one regular expression could match the same character sequence. The warnings give the numbers of the expressions
in the dlg lexical specification file. The numbering of the expressions starts at one. Multiple warnings may be print for the same
expressions.
- Used in place of file names to get input from standard in or send output to standard out.
SPECIAL CONSIDERATIONS
Dlg works... we think. There is no implicit guarantee of anything. We reserve no legal rights to the software known as the Purdue Com-
piler Construction Tool Set (PCCTS) -- PCCTS is in the public domain. An individual or company may do whatever they wish with source code
distributed with PCCTS or the code generated by PCCTS, including the incorporation of PCCTS, or its output, into commercial software. We
encourage users to develop software with PCCTS. However, we do ask that credit is given to us for developing PCCTS. By "credit", we mean
that if you incorporate our source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge
this fact somewhere in the documentation, research report, etc... If you like PCCTS and have developed a nice tool with the output, please
mention that you developed it using PCCTS. As long as these guidelines are followed, we expect to continue enhancing this system and
expect to make other tools available as they are completed.
FILES
mode.h , dlgauto.h , dlgdef.h
SEE ALSO
antlr(1), pccts(1)
BUGS
DLG
April 1994 dlg(1)