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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
using enter key in shell script bishweshwar UNIX for Advanced & Expert Users 1 06-06-2007 10:24 PM
How to run an SQL script inside a shell stevefox Shell Programming and Scripting 1 06-15-2006 10:11 PM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 02:27 AM
How to run unix commands in a new shell inside a shell script? hkapil Shell Programming and Scripting 2 01-04-2006 06:56 AM
Using tar inside a shell script kas7225 Shell Programming and Scripting 2 05-19-2005 11:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-16-2006
bishweshwar bishweshwar is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 56
writing Enter key inside in shell script

for automating telnet using shell script.....

as we enter alphabetic characters inside shell script...how can we do the same for the enter key......Is there any character for the enter key

so the enter key need not be pressed manually......
  #2 (permalink)  
Old 11-16-2006
aju_kup aju_kup is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 189
you can use \n (newline character)
  #3 (permalink)  
Old 11-16-2006
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
if in case \n does not work, try \r (carriage return)
  #4 (permalink)  
Old 01-04-2008
jiin jiin is offline
Registered User
  
 

Join Date: Oct 2001
Location: Atlanta
Posts: 9
writing Enter key inside in shell script

If you are attempting to automate interactive sessions within a script try using expect or perl. Expect has a utility called "autoexpect" which is similar to "script". It will record the session that you want to automate while you perform it once. Then simply edit out the noise. Then you may execute the script as many times as you like.

jiin
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 08:09 PM.


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