Ubuntu :: Capture And Redirect The Output Using Bash?

Jun 3, 2010

if I'm posting to the wrong forum. Be so kind to tell me where to better ask this question, as I'm really not finding the right words to google for.So, I have a shell application (fdb) which is a Flash debugger. I want to run it using bash script, capture it's output and pass it the commands (it can read from STDIN). The reason I want to do so is that Flash Builder (the IDE for Flash development) is plain stupid when it comes to compilation, and it won't allow me to compile any file in the project... so, I found out that I can make Eclipse to run an external tool. This external tool is my *.sh file whichches the compiler, and then it launches the debugger.The Eclipse console can display the compilation results, or errors. When I run the debugger it can even pass the input from Eclipse console to the debugger, however, the output from the debugger isn't shown.

View 1 Replies


ADVERTISEMENT

Programming :: Cannot Capture SCP Progress Bar In Output Redirect

Oct 31, 2010

I would really like to capture the output of scp and my file's progress. Scp updates the transfer rate every 1 second, and I will like to save the transfer rate at every update. So for example, if the file transfer takes 30 seconds, I would like 30 reports of the transfer rate.

The output looks like:
Code:
file.dat 1% 3664KB 938.5KB/s 05:48

Whenever I try a simple redirect like:
Code:
scp file.dat 192.168.1.100:~/ &> output
... it does not save the rate at every update, it only shows the final rate.

If I try using typescript by starting "script" ... it's the same deal.

View 7 Replies View Related

Programming :: Bash Ambiguous Redirect - Redirect One Command Output Which Will Be Treat As A Content Of File For Another Command?

Mar 9, 2011

I am trying to grep multiple numbers from file, grep does have the -f option for that.

Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with

Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?

View 2 Replies View Related

Programming :: Bash: Capture All Output To A Log?

Jun 10, 2010

I have a script that generates a bunch of output, including the expansions details provided by: set -v -xI am trying to pipe everything that is displayed to a file, in addition to displaying it on the screen. I've managed to get stderr and stdout into the file, but the expansions are only printed to the screen. Here is what I have so far:sudo -u <user> source my_job.sh |tee my_log.txt 2>&1

View 2 Replies View Related

Programming :: Bash - Redirect All Subsequent Std Output To File?

Feb 11, 2010

I have got a script with an outer and inner loop. The inner loop issues loads of echo's which need to be redirected to a log file determined by the outer loop. The obvious solution is to redirect every echo to >$LOG and set LOG in the outer loop.

Code:

for f in $FILES ; do
LOG=<logfile>
for l in $LINES ; do

[code]....

it is possible to map stdout to $LOG in the outer loop without having to redirect every subsequent individual command output?

View 4 Replies View Related

Programming :: Bash - Automatically Build A Set Of Packages And Redirect Output Into Logs - Failed Make Should Return A Non-zero Value

Jun 27, 2011

I have a set of bash scripts that I'm running that automatically build a set of packages for me and redirect their output into logs. Basically, I have a bunch of lines that are something like this: ${CONFIGURE_DIR}/configure &> ${LOG_DIR}/log or cd ${CONFIGURE_DIR} && make &> ${LOG_DIR}/log, etc.

This is supposed to make the entire process silent. However, sometimes with some packages some output leaks to my console (either stdout or stderr). I'm thinking that maybe the configure scripts/make are executing commands within new shell instances that don't inherit my redirect, or something to that effect.

Another reason for thinking this is that in another part of my script I detect errors when running make by testing with "if [ $? -ne 0 ]", and if the redirect leaks to my console and also the leaked output indicates that the build failed ("make: Error" and so on), then my $? test fails (i.e., it thinks that $? == 0, whereas a failed make should return a non-zero value). It's as if my original script can't "see" the results from child commands executed from later scripts.

View 1 Replies View Related

Ubuntu :: Script To Capture The Output?

Jun 13, 2011

I got a program that i run and get an output from it -> ./prog -i file-name

However I want to write a script to capture its output and write it in the output-file.txt.

How I can write the script (the-script) such that the 'file-name' treated a a variable?

View 1 Replies View Related

Ubuntu :: Output Redirect With Crontab?

Sep 16, 2010

My Problem: The output redirection auf a script works if the script is called in the terminal but not when its called via crontab.

My Situation: I have 2 scripts:
~/backup1
Code:
echo backup a to c
rsync -a -v --progress --delete --exclude=.Trash-1000 /path/a/ /path/c/backup/
echo backup b to c

[Code]...

View 1 Replies View Related

Ubuntu :: Capture Audio Output To Speakers?

Nov 16, 2010

I have this file:Code:vid-gd-19940626-peggy.rmI would like to extract the audio and copy to a file to burn on a CD.'pitivi' will load the file and show the audio timeline. But I can not find a save or copy button.'vlc' will play the file but I can not find how to seperate/save the audio.I found a 'ffmpeg' that is suppose to read whatever is being sent to your speakers.Code:ffmpeg -f oss -i /dev/dsp -f video4linux2 out.wavThis produce a file that 'mplayer', 'vlc', 'audacity' will load but it is empty of useful data. Black screen only.This is the second week I have worked on this. Either I'm googling for the wrong words or what I'm reading, I don't understand.

View 4 Replies View Related

Ubuntu :: Capture Output From Synaptic Terminal?

Dec 9, 2010

In synaptic package manager when I expand "Details" tab (at the time when some software is installed or removed), I can see a terminal. I want to capture the output of terminal into a file. I tried to highlight and right click. But there is no context menu(copy, cut)

View 4 Replies View Related

Ubuntu Installation :: Capture The Output With A Script?

Jun 13, 2011

I got a program that i run and get an output from it -> ./prog -i file-name

However I want to write a script to capture its output and write it in the output-file.txt.

How I can write the script (the-script) such that the 'file-name' treated a a variable?

View 1 Replies View Related

Ubuntu :: Output Redirect To A File After A Line?

Mar 9, 2011

I want to redirect the output of a command to a file, but not at the end of the file, but after a line. Do you know how can I do it?

Something like:

cat file_a | grep some_text >> resulting_file

# in this file I need to place the output from grep, but not at the bottom of resulting_file, like it would normally happen, but after line .. 3 , for example

Then, if file_a is:

abc x
some_text q
zxc w

[Code]....

View 2 Replies View Related

Ubuntu :: Redirect Output To A File And To The Console?

Apr 11, 2011

I'd like to redirect the output to a file and to the console. I know about tee but the issue is that it waits until the first process finishes.e.gecho "hello world" | tee test.txtfirst calls echo and then tee.Is there a way to redirect "on the fly" ?

View 5 Replies View Related

Ubuntu :: Redirect The Cron Output To Screen?

Oct 15, 2010

i got a bash script which can remind me my friends' birthday ,and i want run it as a cron job everyday,but the linux just emails me the output.Now my question is how to how to redirect the cron output to screen.

PS: when i run the script mannually ,it runs very well,so my script is good. And i have tried :

1.30 8 * * * root /home/birth.sh >/dev/console

it shows nothing

2. 30 8 * * * root /home/birth.sh >/dev/tty1

the same as 1

3. 30 8 * * * root /home/birth.sh >/dev/tty

it shows:/bin/sh: cannot create /dev/tty: No such device or address

View 5 Replies View Related

General :: Capture The FTP Session Output From Net?

Apr 21, 2011

how to capture the FTP session output from Net::FTP module to a text file or in a variable ?

View 1 Replies View Related

General :: Redirect Output From Dd Command?

Apr 7, 2010

How to redirect output from dd command to /dev/null ?

View 2 Replies View Related

Programming :: How To Redirect ALL Output To (log) File?

Aug 6, 2010

I am again struggling to make a script work, but hey, it is fun, I am learning new things. I discovered the set -x option which was, for me, like the second coming. Still, what I am not able to do is redirect ALL output to a (log) file, including what is produced by the -x setting. Let's assume a very simple script:
Code: #!/bin/bash
set -x
source="/home/atelier/Bureau/"
ls -la $source and I am running it as . test.sh >> /var/log/test.rmcb.log

The result of ls goes inded into the log file, but the rest still shows on the console where I am running the script: Code: ++ source=/home/atelier/Bureau/
++ ls --color=auto -la /home/atelier/Bureau/ Is there a way to redirect EVERYTHING to the log file ?

View 3 Replies View Related

Ubuntu :: Redirect Output Of Xorg -configure To A File?

Jun 29, 2010

Ubuntu 10.04

I booted to command line only and entered the following command: Sudo Xorg -configure > xorglog.txt

the command seems to run just fine and does create a new xorg.conf.new file but I would like to see all the output of the Xorg -configure command but it just scrolls by too fast and I can't go back to see it. Hence this is why I'm trying to do the > . It seems to ignore the >.

how I can see what the command is doing?

View 4 Replies View Related

Ubuntu :: Redirect Curl Output To Multiple Files?

Nov 6, 2010

I am using curl as the following

Code:
curl "http://site.com/pages/{1,2,3,4,5}.html" > /home/myuser/allpages.html
i need to save each page in a separate page by the way i have tried this command
Code:
curl "http://site.com/pages/{1,2,3,4,5}.html" > /home/myuser/{1,2,3,4,5}.html
but it displays error
Code:
ambiguous redirect
is there any way to do that

View 5 Replies View Related

General :: How To Redirect The Output To Different Column In .csv File?

Apr 25, 2011

I was trying to redirect the output of two variables to different columns of a .csv file in MS excel like this,

Code:
echo "$a $b" > abc.csv
But I am getting both $a and $b in the same column, is there anything I can use instead of to move the value of $b to the next column? Or is there a good different approach to do it?

View 2 Replies View Related

General :: Redirect Output From Remote To Local?

Mar 29, 2011

I'm doing some commands on a remote server (using ssh to log on to the remote server, did a ssh key swap), how do i redirect the output of a command back to the local server ?the person who helps me out is my HERO i'm really stuck on this and it would bring me a lot further if i get this to work

View 14 Replies View Related

General :: Sudo Aureport Redirect Output?

Aug 6, 2010

How do run aureport as root and redirect it's output to a directory that's only writeable by root?

Ex: sudo -u root aureport > /var/log/test.report
/var/log/test.report permission denied
/var/log has these permissions:
drwxr-xr-x root root

View 1 Replies View Related

Programming :: Redirect Output To Files Using Shell?

May 21, 2011

I have a huge database of students, I would like extract these data and write to individual file for each students.

I am running a loop in shell program (.sh file), the output of each run in the loop need to redirected to a file with variable name.

I tried the following line, but it did not work, where BodyMsg is the data and Rollno is the students roll number.

echo $BodyMsg > $RolNo".html"

View 5 Replies View Related

Programming :: Redirect Output To Remote Server Via Ssh?

May 18, 2009

I need to output of the script to the remote server via redirect. I created a simple script for your reference.Quote:

#!/bin/bash
W=`/usr/bin/w`
FREE=`/usr/bin/free`

[code]...

View 4 Replies View Related

Fedora :: Desktop Video Capture With Very Small Output?

Jul 14, 2010

I'm trying to record my desktop and tested some solutions. While I was impressed how small .mng files could be, it is a disadvantage that I can't capture audio with it and many users won't be able to open these (browser / Windows). I have been very impressed by the xvidcap instruction videos: 4:30 in only 9MB, which makes 180MB for 90 minutes. This would be suitable. With Camtasia my professor even records 90min in 100MB. The problem is that xvidcap hasn't been updated since 2006 and seems to be dead. RecordMyDesktop needs 6MB for 1 minute or 540MB for 90 minutes, which is too much. Could anybody give me some hints on how to capture very small video files, which are still clear enough to read text in a format most users can open? It would also be cool to be able to show specific PDF or HTML pages synchronised to the video.

View 3 Replies View Related

Ubuntu Multimedia :: 2 Capture Cards Result In Bad /dev/video0 And /dev/video1 Output

Oct 3, 2010

I have 3 old video capture cards which I would like to use for CCTV. Each card supports 1 camera. So I would like to have 3 cameras setup in the end and monitor them with zoneminder. When each card is plugged in on it's own, it works fine. Video comes through clearly with xawtv and zoneminder. However as soon as I plug in a 2nd card (with or without a camera connected) the output in xawtv and zoneminder goes haywire. It looks like the 2nd card takes over the first card, resulting in majority of the picture coming from the 2nd card, and some (if any) from the 1st card. When viewing either of the two cards /dev/video0 or /dev/video1 in xawtv the output is identical. I've tried this on a fresh 10.04 Ubuntu install, and on an older MythTV debian computer, the same results. Here are lspci -vv outputs with 2 combinations of cards (same fuzzy output):

[URL]

My thoughts are because the capture cards are cheap (similar to winmodems), the problem may be in the software kernel modules not allowing room for other similar capture cards to run at the same time. Can anyone suggest me in the right direction? Do I need to setup some sort of memory allocation for each card manually? Something in the BIOS? An extra option when the card modules are loaded?

View 1 Replies View Related

Debian :: Redirect Output Sound To Input (mic Or Line-in)

Jan 22, 2011

I want to compare the quality of a sound file (voice) before and after its transmission via a softphone (sjphone in my case). For this, i need to redirect the sound played, to the sound input (microphone or line-in).

View 1 Replies View Related

General :: Redirect Standart Output To Current Terminal?

Apr 17, 2010

i have a process launch by another app, i want to see the output (that is in console) in a terminal (gnome-terminal or tty); how can i capture de standart I/O from a process. my process (aria2) is launch by firefox and the output of ps is like:

# ps aux | grep aria2
dorian 30289 2.8 0.1 12148 4048 ? D 07:08 0:03 aria2c --continue -d /home/downloads/so/suse --referer=http://software.opensuse.org/112/en

...is running but i cant see the output (download state), how can i capture or redirect standart I/O to my terminal to get something like the output of:

$ aria2c --continue -d /home/downloads/so/suse --referer=http://software.opensuse.org/112/en --load-cookies=/tmp/flashgot.h2fnxf84.default/cookies --input-file=/tmp/flashgot.h2fnxf84.default/flashgot.fgt
[#1 SIZE:6.7MiB/4,289.3MiB(0%) CN:5 SPD:25.3KiBs ETA:48h01m01s]

View 1 Replies View Related

General :: Run A Script In The Background Redirect The Output To A File?

Feb 11, 2010

I wrote a short script that sleeps for 30 seconds then outputs "Done" to the screen:

sleep 30
echo Done

now I want to re-direct the output to a file, I tried:

./scriptName& > fileName

Didn't work, "Done" still came out to the screen.

View 5 Replies View Related

General :: Unable To Redirect Script Output To File

Aug 25, 2009

I have a python script that when run outputs to screen.

eg.
./international_sms_check.py 0403000511 919227434827
TS 21 check ok
TS 22 check ok
sms successfully delivered from 61403000511 to 919227434827
But when I try:./international_sms_check.py 0403000511 919227434827 > test

The file test is created but there is nothing in it.if I try ls > test this works fine with output of ls redirected to file test.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved