LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2004, 10:31 AM   #1
linuxdev
Member
 
Registered: Feb 2004
Posts: 34

Rep: Reputation: 15
Getting user input and updating file


hey all

I am trying to write a script which can take input from user-- like version number,
patch files etc and then should be able to add these files in the desired location
of my file(where I want inputs to be added)

Any clues how to due that....or any reference book to look for this particular
requirement...

Thanks all
 
Old 02-24-2004, 03:22 PM   #2
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
Try this:
###
#!/bin/bash
echo "Enter filename to update: "
read filename
echo "Enter what to add: "
read upd
echo $upd >> $filename
###

Last edited by ivanatora; 02-24-2004 at 04:15 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash scripting and user input Woodsman Slackware 13 11-02-2005 03:20 PM
How to disable F11 user input? jpan Linux - General 3 09-17-2004 04:28 AM
validating user input blanks Programming 3 09-02-2004 04:47 PM
Shell script user input tuckermaddox Linux - Newbie 5 08-12-2004 04:14 AM
User input using a BASH script... causticmtl Programming 5 07-13-2003 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration