Sponsored Content
Homework and Emergencies Homework & Coursework Questions Print questions from a questions folder in a sequential order Post 302480296 by vbe on Tuesday 14th of December 2010 12:51:11 PM
Old 12-14-2010
Are you sure your question while loop is working? What happens when you get "invalid choice"?
When you choose Question 2, is it the correct one displayed?
And ctsgnb is right, in order to do what you want, you ought to finish your answer function - and use it...
 

9 More Discussions You Might Find Interesting

1. Programming

C questions

What does "extern" do? ex. extern int x; and another question, what about using static in functions? like: static void foo(), why? (2 Replies)
Discussion started by: Esaia
2 Replies

2. UNIX for Dummies Questions & Answers

questions

Dear Guys , I have some Questions , i need to have answeres for . 1. now if i took a back up for /etc/passwd and /etc/shadow , like simple copy .. and Install a new system , and paste those two files to the new system ... are the passwords and user info. going to work ?? is it posibble ? ... (1 Reply)
Discussion started by: tamemi
1 Replies

3. UNIX for Dummies Questions & Answers

few questions

hi , i have got few questions 1) i created a file "-myfile" .how can i remove this?what command shud i issue 2) i used echo "TODAYS DATE" ; DATE..........but date is comoing in second line..how can i make it come in single line? 3) how can i list all files in a directory using for... (5 Replies)
Discussion started by: vivekshankar
5 Replies

4. AIX

Basic AIX Print Queue Questions

Morning, All I've been doing some work on AIX print queues, troubleshooting some underlying issues we've been having. In the process of this I've uncovered some potential gaps in our knowledge. Our typical setup is remote impact printers (In this case OKIML5520s, with NICs) and local queues... (0 Replies)
Discussion started by: alexop
0 Replies

5. Programming

Reading special characters while converting sequential file to line sequential

We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies

6. Programming

A few C questions

Hi guys. I'm writing a basic script in C# and there's a few areas where I am stuck, and I was wondering if you may be able to help me? 1) Can you embed an image into the source code so it will show in the windows GUI? 2) Can you change the background of the GUI? 3) How do you add an .ico to... (5 Replies)
Discussion started by: JayC89
5 Replies

7. Programming

C++ questions

1.) Let's say I have a list: apple1, apple2, apple3, apple4, apple5 Does anyone know how to display the txt file using c++? Does anyone know how to insert apple6 into the text file using link list and show the whole list including apple6? (1 Reply)
Discussion started by: bscot008
1 Replies

8. UNIX for Dummies Questions & Answers

Vi questions

Hello, I would like to know how we can highlight/select a section of a file in vi and delete that section if we don't want to use the dd command to delete one line at at time. There is one where we don't want to delete the whole line , but up to a certain word. (2 Replies)
Discussion started by: Pouchie1
2 Replies

9. Shell Programming and Scripting

awk to print missing and keep sequential ordering if not found

The below awk in bold will look for the ids in file1 in $2 of file2 and if they match print the line in file2. If an id is missing or not found in file2 (like BMPR2 in line4 of file1) I can not figure out how to add it to them to the lines in the output as missing in $3 following the same format.... (4 Replies)
Discussion started by: cmccabe
4 Replies
Prophet::CLI::Command(3pm)				User Contributed Perl Documentation				Prophet::CLI::Command(3pm)

   Registering argument translations
       This is the Prophet CLI's way of supporting short forms for arguments, e.g. you want to let '-v' be able to used for the same purpose as
       '--verbose' without dirtying your code checking both or manually setting them if they exist. We want it to be as easy as possible to have
       short commands.

       To use, have your command subclass do:

	   sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  f => 'file' };

       You can register as many translations at a time as you want.  The arguments will be translated when the command object is instantiated. If
       an arg already exists in the arg translation table, it is overwritten with the new value.

   require_uuid
       Checks to make sure the uuid attribute is set. Prints an error and dies with the command's usage string if it is not set.

   edit_text [text] -> text
       Filters the given text through the user's $EDITOR using Proc::InvokeEditor.

   edit_hash hash => hashref, ordering => arrayref
       Filters the hash through the user's $EDITOR using Proc::InvokeEditor.

       No validation is done on the input or output.

       If the optional ordering argument is specified, hash keys will be presented in that order (with unspecified elements following) for edit.

       If the record class for the current type defines a "immutable_props" routine, those props will not be presented for editing.

       False values are not returned unless a prop is removed from the output.

   edit_props arg => str, defaults => hashref, ordering => arrayref
       Returns a hashref of the command's props mixed in with any default props.  If the "arg" argument is specified, (default "edit", use "undef"
       if you only want default arguments), then "edit_hash" is invoked on the property list.

       If the "ordering" argument is specified, properties will be presented in that order (with unspecified props following) if filtered through
       "edit_hash".

   prompt_choices question
       Asks user the question and returns 0 if answer was the second choice, 1 otherwise. (First choice is the default.)

   prompt_Yn question
       Asks user the question and returns true if answer was positive or false otherwise. Default answer is 'Yes' (returns true).

   print_usage
       Print the command's usage message to STDERR and die. Commands should implement "usage_msg", which returns the usage message.

       If the usage message method needs arguments passed in, use a closure.

   get_cmd_and_subcmd_names [no_type => 1]
       Gets the name of the script that was run and the primary commands that were specified on the command-line. If a true boolean is passed in
       as "no_type", won't add '<record-type>' to the subcmd if no type was passed in via the primary commands.

perl v5.10.1							    2009-08-19						Prophet::CLI::Command(3pm)
All times are GMT -4. The time now is 09:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy