Ubuntu :: Playing With Tty And Pty (echo And Cat)?
May 11, 2010
I've read a bit about pseudo terminal but I still don't get it fully, I've found a really sweet article:
[URL]
I thought the two end tty and pty were acting like a pipe so while testing, I opened two terminals:
terminal1: cat /dev/ptyq9
terminal2: echo "test" > /dev/ttyq9
And it worked, terminal 1 printed: "test". But if the pipe is bi-directionnal ( as terminal were echoed back what user was typing), I was expecting to be able to go the other way around:
terminal1: cat /dev/ttyq9
terminal2: echo "test" > /dev/ptyq9
It does not work ! Echoing on pty just terminates the cat on pty. How is the "return" working them ?
View 1 Replies
ADVERTISEMENT
Dec 16, 2010
What is the difference between
$echo cat
$cat echo
View 1 Replies
View Related
Sep 1, 2010
check the following program
/*a.c*/
int main()
[code]....
View 1 Replies
View Related
Dec 28, 2010
When I use rar e to extract a rar file, the request for entry of the password always says password will not be echoed. For longer passwords, this is difficult, since a single mistyped key will result in an error.
Does anyone know how I can use the rar command to extract and have the password echoed (appear on the screen as I type it)?
View 2 Replies
View Related
Jun 17, 2009
I am trying to echo some value using awk, and for reading the file i am using cat command. If there no space in the file content then the following script result correctly.
console: # cat 1
one;two;three;
four;five;six;
[code]....
In case any space is there in the file 1 then i am facing the problem in the output value
console: # cat 1
o ne;two;three;
four;five;six;
[code]....
View 5 Replies
View Related
Mar 22, 2010
I'm a n00b in shell scripting,echo "$num $den $file" is the current formatI need 10 right padding for each term above in the above where $num & $den is of %d type, whereas $file is %s type.
View 2 Replies
View Related
Nov 5, 2010
In a script, when I enter "echo $1" the first argument is outputted. When I enter:
a=1
echo "$$a"
The output is just "$1", not the first argument. If I enter:
a=1
b=$$a
echo $b
The output is still "$1" and not the first argument. How can I get echo to output the first argument without use "$1" directly?
View 4 Replies
View Related
Feb 2, 2011
I have ubuntu desktop 10.10. I wrote a simple script that I want to execute at system startup. The only problem I have (and one that I've been struggling with for the better part of the day) is that I don't see the outputs of the script during startup.
View 1 Replies
View Related
May 15, 2011
I was using a line device to record compact cassettes to digital (Linear PCM) then I transferred these files to the computer.Due to cassette print-through, there is audible, albeit weak, pre-echo. This is not caused by the recorder since I can hear them playing the cassettes on a deck.So. Does Audacity have a pre-echo removal function, or can a similar result be obtained by applying different effects? Or any 3rd-party plug-ins?
View 1 Replies
View Related
Oct 19, 2010
how to echo an '-n' without a new line?
View 8 Replies
View Related
Jan 18, 2010
I'm confused about what "echo $0" in a shell actually return. Consider these tests:
Code:
[root@e11apvl151 ~]# # Login shell:
[root@e11apvl151 ~]# echo $0
-bash
[root@e11apvl151 ~]# # Starting a new shell
[root@e11apvl151 ~]# bash
[root@e11apvl151 ~]# echo $0
bash
[root@e11apvl151 ~]# screen
[root@e11apvl151 ~]# echo $0
/bin/bash
Depending on wether the shell is a login shell, a regular shell, or a screen utility, I get different results.
View 8 Replies
View Related
May 7, 2010
Here's a strange compiz effect - odd visual echo when you rotate the cube. I kept my /home partition from the Lucid beta testing and compiz seems to have problems with it - looks like I will have to do a complete format and reinstall to solve this. I already purged and reinstalled compiz and anything I could find associated with it. Anyone else suffering from a buggy compiz? The strange thing is - this only occurs 1 out of 10 boots???
View 4 Replies
View Related
Sep 7, 2010
I'm trying to use system to call echo and pass variables to it. That was a success. The problem is the variables inside the while-loop i wrote cannot be manipulated. what I'm doing wrong here? here's the code:
Code:
#include <iostream>
#include <stdlib.h>
#include <string>
#include <sstream>
[Code]....
View 7 Replies
View Related
Oct 12, 2010
I'm running Maverick right now, but the problem also occurs with Lucid. My sound card is a creative X-Fi Titanium (emu20k2). Audio playback is fine, surround is fine, etc. Audio capture is "fine" too - the problem is that the microphone picks up everything that the headset is outputting. This is very strange since the headset is a noice-cancelling headset and in order for that to happen on other platforms (windows) I essentially have to turn the volume up to astronomical levels. As always, this doesn't happen on windows.
Needless to say this poses somewhat of a problem with VoIP applications since folks I'm interacting with constantly hear themselves echoed back by me. The only solution is to tune down the microphone volume but that adds another problem: people can no longer hear me clearly.
So my question is: is there a way to enable echo reduction for Pulse Audio so that the mic doesn't constantly capture what's coming from the outputs? And yes - when I look at the "input" tab in the sound preferences application I can see the marker move if I speak - same with pavucontrol
View 1 Replies
View Related
Nov 26, 2010
How can I echo the sound from the microphone to the speakers?
I.e., anything that is picked up by the microphone is played on the speakers immediately, without recording anything. Preferably with the ability to increase the volume.
View 3 Replies
View Related
Mar 7, 2011
Do you know if there is anyway to reduce the echo in audio files, by using Cinelerra, Audacity or whatever....Online, I haven't found incoragins answer...hope something better can come up from the forum.
View 1 Replies
View Related
Mar 27, 2011
I have a script, echoSmart.sh:
Code:
#!/bin/bash
smartctl -a /dev/sda > /smartlogs/sda-$(date).txt
[code]....
View 3 Replies
View Related
Jul 31, 2011
ok i have a problem with "if" condition:
Code:
#!/bin/bash
playerId="0";
[code]....
View 3 Replies
View Related
Jun 28, 2015
I can play audio in my alsa system and I can record. To keep things simple, I use arecord to record and aplay to play. So far so good. The problem is, I cannot hear what I am recording as I record it. Is there some way to get the input to be echoed to the output? I would optimally like to be able to do this before recording as well as during, so that I can check the levels, find the part to record on the tape, beforehand.
I have tried a test of my card: I had aplay running in one term and arecord running in another. They both ran fine and when I checked the just-recorded file, it was different audio from what I had been playing. This would indicate that the card is able to input and output at the same time, I think? I've done the usual googling as well as reading through URL... and I have done many passes of trial-and-error on my .asoundrc. The more I look at my .asoundrc, the more it looks like it should be doing what I want, but it is not.
My .asoundrc (which again, does works but does not echo audio input):
Code: Select all# pros: this allows playback and record. Playback of several
# programs at the same time works (their outputs are mixed
# together, mono and stereo mixed to stereo)
#
# cons: input is never echoed!
[code]....
View 1 Replies
View Related
Sep 26, 2010
I execute an application from a script file and redirect stdin to it from here-doc like this:
my_cli << HERE_DOC
enable
configure
10
exit
exit
HERE_DOC
This works as expected, but I don't see neither the input nor the app output. The application is an interactive prompt written in C. When I interact manually with it, I see the prompt itself and responses to my input, but when I execute the aforementioned script I see nothing. I would like it to print the input and the output as if a real user was typing. Do you know how to achieve that?
View 3 Replies
View Related
Sep 26, 2010
I have a process which logs output to log.txt. If I want to see the process's status in real-time, is there a way to echo that output to stdout instead of opening the log in a text editor and constantly reloading?
View 3 Replies
View Related
Nov 28, 2010
What does echo $$ give as output?
View 3 Replies
View Related
Feb 25, 2010
I'd like a function in my .bashrc file that would allow me to pass text to it and echo the text to a specified file. I know it's simple as "echo 'text' >> file," but ideally, I would want to alias the function so I execute something like:
Code:
user~ $ write 'this is a test' with "write" being the function, and 'this is a test' being echoed to the file. I hope I explained that well enough.
View 3 Replies
View Related
Jan 11, 2010
I am testing the serial ports on a Single Board Computer(SBC) running Linux kernel 2.6.29. I usually do this by connecting the serial port to another PC serial port, then doing "cat /dev/ttyS0" on PC and "echo hello > /dev/ttyS0" on the SBC. However in the current system, "echo hello > /dev/ttyS0" command does not return at all! Also no characters appear on the destination port. I am running the echo command as root. The system boot messages show that the serial port in indeed /dev/ttyS0.
View 2 Replies
View Related
Jan 25, 2010
I have always encountered this problem in ubuntu bash shell scripts that echo command in a function will be treated as a return value when used in a function. e.g.
[code]...
The output would simply be xyz. Hence the echo seems to function as a "return" command when used in a function with a return value.
View 4 Replies
View Related
Dec 1, 2010
What's the difference between PHP echo() and PHP print(), especially in the execution time?
View 6 Replies
View Related
Feb 17, 2010
I have created a new script that I am executing at system startup. All was going well until the last step... see below
1. Create script mytestscript.sh
2. Made executable
3. Test script from command line. Works no problem
[code]...
View 8 Replies
View Related
Jul 12, 2010
I've been trying to configure ufw to drop ping requests for a couple days now, and I can't figure it out. I've tried a couple different methods in some different guides, still nothing. Anyone know how to do this?
View 4 Replies
View Related
Aug 28, 2010
I use an echo indigo audio card. When I do aplay -l I see this card, and I can ouput audio through it by specifically telling mplayer to use this (alsa) device. Now I want to use this card as default for all audio. At the moment the default is pulseaudio through the built in soundcard. How can I change this? Im running Ubuntu 10.04.
View 4 Replies
View Related
Jan 30, 2011
I can hear my echo in the headphone from the microphone. It is annoying when I make VoIP calls using the headset because I can hear my own breathing all the time
View 3 Replies
View Related