Ubuntu :: Right Padding In Echo Of Shell Script?
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
ADVERTISEMENT
Sep 1, 2010
check the following program
/*a.c*/
int main()
[code]....
View 1 Replies
View Related
Jun 21, 2011
I'm trying to create a shell script to take an argument and use it to name a terminal tab. So if the script's name is tabnm, tabnm "test" should rename the current tab "test"
This is my code:
#!/bin/sh
echo -ne "e]1;$1a"
but when i run it I get this output:
robin@icarus $ sh tabnm.sh test
-ne e]1;test
If I just run echo -ne "e]1;Testa" straight in the shell, the tab is renamed.
View 2 Replies
View Related
Feb 27, 2011
Would like to know how to turn "echo" off in a shell scripting. I wrote a shell script, testing a condition, after the condition tested. On the other line I used the echo Command to echo a line, then on the other line I used the "read" command to read an input typed. The crux here is the string or line inputed is what I would like to turn off. Distro is redhat linux.
View 6 Replies
View Related
Jan 8, 2010
I want to suppress the output resulting from the commands in my scripts, when writing batch commands in dos I would just use @Echo Off.
I have written an example of what I want to achieve
Code:
#!/bin/bash
clear
@Echo off
[Code]....
View 8 Replies
View Related
Dec 16, 2010
What is the difference between
$echo cat
$cat echo
View 1 Replies
View Related
Mar 11, 2011
I have some videos in an mkv container that are 1920 pixels wide, but less than 1080 pixels high. This causes problems when playing the videos on a PS3 (after converting to an AVCHD system), because the PS3 won't centre the video, leaving a very large black bar at the bottom but none at the top. Is there a way to use mencoder or ffmpeg to losslessly add padding to the top and bottom to make the video 1920x1080?
If I use
Code:
ffmpeg -i video.mkv -acodec copy -vcodec copy -scodec copy -padtop 132 -padbottom 132 out.mkv
then ffmpeg won't do the padding, and the resulting file is basically exactly the same. If I use
Code:
ffmpeg -i video.mkv -acodec copy -vpre libx264-lossless_fast -scodec copy -padtop 132 -padbottom 132 out.mkv
I get
Code:
Output #0, matroska, to 'anr.mkv':
Metadata:
encoder : Lavf52.64.2
[code]......
View 1 Replies
View Related
Jun 24, 2011
I am using RED HAT linux AS-4. I have written a script which execute on job. This script takes the cold backup of oracle database files. The script is
Script:
SQL> !tar cvf /4hd/backup/temp_backup/full_offline_backup_`date +%d-%m-%Y+%H-%M-%S`.ora /home/oracle/oradata/orcl /2hd/oracle /3hd/oracle /backup_ide/oracle --gzip --exclude-from=/home/oracle/backup_scripts/exdtime
[code]....
Error: tar: Error exit delayed from previous errors
Due to this error the backup cannot be restore to standby server.
View 3 Replies
View Related
May 20, 2010
I just right clicked on my top panel and clicked on new panel, and it's created padding around my maximised windows and now panels show up :S:SS:S
View 6 Replies
View Related
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
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
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