LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2013, 02:05 AM   #1
arunext
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
Question How do i send spaces to standard output ?


Hello folks,
i am trying to simulate <hold space key> command in linux...Is it poosible ? i am using expect in a script which stops at a prompt "Press and hold spacebar to enter the bootrom" ...?
i have tried :
send " /r" ..but this doesnt work..any help would be appreciated !
 
Old 09-03-2013, 08:33 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,579

Rep: Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342
using expect you need: send " "
using shell you will need: echo " "
but probably I misunderstood something
 
Old 09-03-2013, 09:16 AM   #3
arunext
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Cool

i found the solution after hours of googling

send "\x20\x20\x20\r"

it is space in asci ---\x20
 
Old 09-03-2013, 09:22 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,579

Rep: Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342Reputation: 4342
Code:
send "   \r"
.      ^ three spaces
probably works also
 
  


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
Standard script output to screen & -x option output to file BoBeau236 Programming 6 05-10-2011 08:43 AM
[SOLVED] how to send the output of send command to a file auma78 Linux - Newbie 2 01-23-2011 01:06 AM
Weird problem: can't send files with lots of spaces randm Linux - Networking 3 05-10-2008 09:34 PM
How do I parse the output of a command that output to standard out? gauol Programming 9 01-17-2008 02:54 PM
what does "standard error was duplicated as standard output" mean? nickleus Linux - General 4 09-15-2006 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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