LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 01: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, 07:33 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
using expect you need: send " "
using shell you will need: echo " "
but probably I misunderstood something
 
Old 09-03-2013, 08: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, 08:22 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

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


Reply



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

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

All times are GMT -5. The time now is 06:03 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
Open Source Consulting | Domain Registration