LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-18-2008, 02:38 PM   #1
Laedrus
LQ Newbie
 
Registered: May 2007
Location: Brazil
Distribution: Debian and RHEL
Posts: 7

Rep: Reputation: 0
How to emulate user on terminal (without bash scripts)


Hello there,

My idea is use something like

echo "ls" > tty2

and this command should work. But my idea is to use in other enviroments than bash.

My idea is to make scripts to automate tasks AS:

typing some commands on a FTP terminal for example.

I wanna do some scripts, but not to run in bash enviroment, but to inject the commands via a bash or perl script.

what i get with this is only

echo "ls" > tty2

<on tty2>ls

but this doesn't work as typed text, there is some way to do it?

there is some way to emulate one user typing something in a terminal and pressing enter???

I know that if were from one user to another could be a security hole, but from one to the same user i don't see why not.

sorry for the confusion, but it can save my life with a software that isn't well done.
 
Old 08-18-2008, 06:44 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Perhaps you're thinking of expect?
 
Old 08-20-2008, 01:59 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
You can try KBDE (http://kbde.sf.net)
 
  


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
User input into Bash scripts and checking validity of user input?? helptonewbie Programming 8 07-07-2008 06:40 PM
Run php scripts in terminal gpm1982 Programming 3 04-30-2008 03:20 AM
little help with bash scripts sniff Programming 2 10-26-2005 05:17 PM
Bash Scripts Skute Programming 7 03-12-2004 10:17 AM
Terminal : user@localhost => bash-2.05a$ storm Linux - Newbie 3 03-09-2003 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:04 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