Google Answers Logo
View Question
 
Q: programme ( No Answer,   1 Comment )
Question  
Subject: programme
Category: Computers > Operating Systems
Asked by: 36272118-ga
List Price: $2.00
Posted: 12 Dec 2003 05:03 PST
Expires: 11 Jan 2004 05:03 PST
Question ID: 286296
help me to write a programme using cat command in born shell and pls
tell me al the uses of cat command

Request for Question Clarification by sgtcory-ga on 12 Dec 2003 10:49 PST
Hello 36272118,

How complex are you looking to make this shell script? If it is more
than a few lines you may consider looking at the Answers Pricing Guide
:

Answers Pricing Guide
http://answers.google.com/answers/faq.html#howmuch

Should you just need a small example with an explanation, I will be
able to assist you. 'All' the uses of the 'cat' command may not be
feasible, but I can tell you many of the typical uses.

Thanks for the clarification,
SgtCory

Clarification of Question by 36272118-ga on 13 Dec 2003 02:13 PST
i am happy to see your reply.i want to write a small programm just
using cat comand.A programme of Userinterface.pls help me.
My idea is Creating a file.and adding details of personal details.
the fields would be name,address,etc..
and then test the programme by giving the name and it should display
the details.in the same way if it not exsiiting it should reply not
found.
thank you for the answer.

Request for Question Clarification by sgtcory-ga on 14 Dec 2003 19:10 PST
"My idea is Creating a file.and adding details of personal details.
the fields would be name,address,etc.."

Do you mean you would manually create the file? (As opposed to the
script creating the file.)

Thanks again,
SgtCory

Clarification of Question by 36272118-ga on 19 Dec 2003 12:50 PST
hi i need to write a simple programme.but we need to use the cat
commands.so that we need to use the max. use of cat command.
i.e create a file.
view the file.
concat the file
so if u can help in writing a programme for this,i will very happy.
i can make your work easy.
just write a programme 
1) create a file
2) VIEW THE FILE
3) concat the file
so when i press 1 it should create a file.
2 view and so on
other than 1,2,3 if we press any other numbers.it should say wrong number.
so pls help me.its urgent.
thank u

Clarification of Question by 36272118-ga on 25 Dec 2003 09:31 PST
write a small programme using cat commands in the born shell
programme.pls le t me know.
Answer  
There is no answer at this time.

Comments  
Subject: Bash manual
From: dvrasp-ga on 01 Jan 2004 17:52 PST
 
My advice would be to look at the bash manual, by typing 'man bash'.
You can also find it on the web. A relevant section of it is :
http://www.neosoft.com/neosoft/man/bash.1.html#toc13

*Redirections*.

You'll learn that, for instance :
  cat filename   # displays the content of a file
  cat filename filename2 # displays two files
  cat f1 f2 >f3  # create a file named f3, and put the content of f1
and f2 into it (instead of displaying it)
  cat >filename  # creates a file and fills it with what you type (end with CTRL-D)
  cat >>filename # append to file


Next you'll have to learn how to read keys from user input.

Here is a template in bash :

read -n 1 menun  # reads one keystroke, an put it in $menun variable
case $menun in   # choose appropriate action
  1) # key 1 pressed
    echo "Menu 1"
    ;;
  2) # key 2 pressed
    echo "Menu 2"
    ;;
esac

Good work.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy