The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Reading input from user vadharah Shell Programming and Scripting 2 03-09-2008 10:35 AM
Help reading an input file in KSH zilla30066 Shell Programming and Scripting 2 02-01-2007 06:45 AM
Script for reading an input file gzs553 Shell Programming and Scripting 1 10-17-2006 06:55 AM
Reading input to create a variable in a script? darthur UNIX for Dummies Questions & Answers 7 12-14-2001 01:12 PM
reading from input nageshrc Shell Programming and Scripting 1 11-29-2001 06:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-30-2001
alwayslearningunix
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
#!/usr/bin/sh
echo "Enter reason:"
echo "> \c"
read $reason
$reason >> access.log

This doesnt work for me. Can someone tell me how I would read the input from what the person types, and then append that to the log file?

Regards
  #2 (permalink)  
Old 03-30-2001
98_1LE 98_1LE is offline Forum Advisor  
Registered User
  
 

Join Date: Dec 2000
Location: Greater Dallas area
Posts: 405
Try:
Code:
#!/usr/bin/sh
echo "Enter reason"
echo "> "
read reason
echo $reason >> access.log
or on solaris (maybe others)
Code:
#!/usr/bin/sh
/usr/ucb/echo -n "Enter reason > "
read reason
echo $reason >> access.log
  #3 (permalink)  
Old 03-30-2001
alwayslearningunix
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Thumbs up Thanks

Thanks worked - I put
date >> ktekaccess.log
just before appending $reason to the file to add more value to the entry.

Regards
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0