12-30-2010
These 2 Users Gave Thanks to fpmurphy For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm just starting out with UNIX and have figured some stuff out. I just need some help with accepting user input on the command line. For instance, I created a number counter that counts down from any positive hard coded number. But, I want the commnad line line to read "Countdown 20" where 20... (1 Reply)
Discussion started by: scott78
1 Replies
2. Linux
I'm using Red Hat Linux 3, and the computer has stopped taking input from mouse, keyboard, etc. What are possible causes? How can I fix?
-Worried Linux User (11 Replies)
Discussion started by: lunchtime
11 Replies
3. Shell Programming and Scripting
He guys.
Basically I want to make a script that can add, delete and view stuff in a external file called config.txt. I can open it up in Joe but im not sure how to read in the user input or using commands automatically in joe to edit, save then quit.
Problem area below:
1) echo "Add... (1 Reply)
Discussion started by: Pits
1 Replies
4. Shell Programming and Scripting
i need to accept the user input in my c shell script before executing next command. i have the following code which ask for user input, but does not store this value.
set req
echo " Enter your input(Y/N)?"
read req
if (req = Y)
echo " print $req"
else
echo " print $req"
... (3 Replies)
Discussion started by: skumar11
3 Replies
5. Shell Programming and Scripting
hi
I am trying to invoke another application script from my script like
---------------------------
main
.
.
./new appl <<EOF
Input 1
Input 2
EOF
.
.
exit
------------------------
But is exits the new application after input command 2, I want that it should not exit and accept... (1 Reply)
Discussion started by: ashish_uiit
1 Replies
6. UNIX for Dummies Questions & Answers
I how do i accept a input date in script which is lesser than a specified day? ex: to accept a date less than or equal to 100 days(from today).?:(
Thanks for the help in advance.:) (1 Reply)
Discussion started by: abhi_123
1 Replies
7. Shell Programming and Scripting
Is there a way to display the default answer when accepting input from the user in the unix script..
e.g.
ans="n"
read $ans?"Enter y to continue n to exit:"
altough ans contains n the message doesn't display the current contents on ans .. you get
Enter y to continue n to exit: (8 Replies)
Discussion started by: flopster
8 Replies
8. Shell Programming and Scripting
basically im trying to promt the user to create a name for a file then send the file name to a file with the list of the file names he has created. Also i want to code if the user doesnt enter any text to just print "Default Folder"
so far my code looks like:
if
then
echo "create `$1`... (1 Reply)
Discussion started by: bravens52
1 Replies
9. Shell Programming and Scripting
Hi I am trying to get my script to accept input regardless if the person enters a or A. here is the portion of the code where I get the input.
echo -n 'Please enter your choice:' # prompt user for input.
read reply # read input
echo
case $reply in #... (2 Replies)
Discussion started by: DualPandas
2 Replies
10. UNIX for Dummies Questions & Answers
I have this tcsh code that I want to convert to a bash script. Basically it accepts command line arguments supplied by the user and stores them, so they can be used to run a C++ program.
set arg_browseDir_inFileLst = ""
set allArgsUpCase = `echo "$*" | tr '' ''`
set opt_browseDir_flag =... (17 Replies)
Discussion started by: kristinu
17 Replies
YACC(1) BSD General Commands Manual YACC(1)
NAME
yacc -- an LALR(1) parser generator
SYNOPSIS
yacc [-dlrtv] [-b file_prefix] [-o output_filename] [-p symbol_prefix] filename
DESCRIPTION
Yacc reads the grammar specification in the file filename and generates an LR(1) parser for it. The parsers consist of a set of LALR(1)
parsing tables and a driver routine written in the C programming language. Yacc normally writes the parse tables and the driver routine to
the file y.tab.c.
The following options are available:
-b file_prefix
Change the prefix prepended to the output file names to the string denoted by file_prefix. The default prefix is the character y.
-d Cause the header file y.tab.h to be written.
-l If the -l option is not specified, yacc will insert #line directives in the generated code. The #line directives let the C compiler
relate errors in the generated code to the user's original code. If the -l option is specified, yacc will not insert the #line
directives. Any #line directives specified by the user will be retained.
-o output_filename
Cause yacc to write the generated code to output_filename instead of the default file, y.tab.c.
-p symbol_prefix
Change the prefix prepended to yacc-generated symbols to the string denoted by symbol_prefix. The default prefix is the string yy.
-r Cause yacc to produce separate files for code and tables. The code file is named y.code.c, and the tables file is named y.tab.c.
-t Change the preprocessor directives generated by yacc so that debugging statements will be incorporated in the compiled code.
-v Cause a human-readable description of the generated parser to be written to the file y.output.
If the environment variable TMPDIR is set, the string denoted by TMPDIR will be used as the name of the directory where the temporary files
are created.
FILES
y.code.c
y.tab.c
y.tab.h
y.output
/tmp/yacc.aXXXXXXXXXX
/tmp/yacc.tXXXXXXXXXX
/tmp/yacc.uXXXXXXXXXX
DIAGNOSTICS
If there are rules that are never reduced, the number of such rules is reported on standard error. If there are any LALR(1) conflicts, the
number of conflicts is reported on standard error.
BSD
May 24, 1993 BSD