General :: Redirecting Output Of Set -x?

Mar 16, 2011

I have written a script and included the command

Code:
set -x
to see what happening when i run the script

View 7 Replies


ADVERTISEMENT

General :: Redirecting Output From Stderr?

Dec 1, 2010

I have seen a post where someone was explaining the virtuality of stdout and stderr and that it can be redirected with e.g. 2>file.txt but this apparently is not working for me!
I have a CUPS filter with fprintf(stderr,...)

View 5 Replies View Related

General :: Redirecting Command Output To File?

Sep 19, 2011

This seems so simple when doing it from command line but I'm not able to accomplish it inside a script. I am trying to put output of following command into a text file:

CMD= mysql -uroot -psecret -e 'SHOW SLAVE STATUS G;'
FIL=~/replication-`date +%F`.txt
MAILTEXT=~/mailtext.txt
touch $FIL
$CMD > $FIL

Where FIL is a variable that contains path of the file to which to output command. I am running this command in a shell script from where I want to email contents of $FIL as attachment using mutt. But I am always getting 0 byte file. Also if I examine in directory the file is of 0 byte length.

View 3 Replies View Related

General :: Redirecting Output From A Command Using Bash?

May 10, 2011

I would like to get the command and it's output redirected i have tried using the below but my syntax seems to be incorrect .

<<EOF
$(ls)
EOF

View 2 Replies View Related

General :: Redirecting Output Message While Inserting A New Device?

Dec 28, 2010

When inserting/removing a usb device to a board based on linux system, an output is given:

Code:
# mmc1: card 0001 removed
mmc1: new SD card at address 0001

[code]...

View 6 Replies View Related

General :: Message In Terminal After Redirecting Output And Build Completes?

Oct 9, 2010

I'm not sure about the following behavior so thought I would put it out to see if there is an error I need to resolve, or simply a process that I need explained.I'm also not sure if this is an Ubuntu issue, a Linux issue, or other... but here goes.I ran my "make build" in two different ways; one with just "make build" and one with "make build > output" (so I could review the full script).With just "make build" the process finished and returned to the command prompt.

With "make build > output", after the process had finished (script in output document identical to what was in the terminal with "make build") a new set of data was displayed in the terminal (see below).With the other examples of using "make build > output" the times it would parse something back to the terminal window was when there was an error. As I fixed the errors these breaks back to the terminal window would stop. So I'm wondering if this indicates a new error, but because the "make build" now completes successfully (at least it appears to), I'm wondering if this data in the terminal window is just a behavior related to redirecting the output script using the ">" process and something to do with returning to the terminal once a process completes

View 4 Replies View Related

Hardware :: Redirecting ALL Audio Output?

Jan 15, 2011

So I have a DAC/Headphone Amplifier which plugs in through USB. Through the system settings I'm able to set it as the preferred audio output option. This makes all the windows manager sounds come through the headphones, but all the applications still come through the laptop speakers; i guess they are completely independent of the system settings. I have to set each application's output preferences separately, and some software (like Firefox) doesn't have any output preferences. So is there a way toirect the audio output of all applications to all come through the USB DAC

View 4 Replies View Related

General :: Redirecting Command Output To Input Of Another Command?

Jul 2, 2011

I want to run gsettings list-schemas (which return a list of about 100 names separated by spaces)and somehow direct each name one at a time as the input to this command:gsettings list-recursivelyI've tried it with awk, and standard | piping and also as a string variable strvar=$(gsettings list-schemas) and using the $strvar as the input butam missing something in between I'm sure like for - while or proper syntax of awk etc

View 3 Replies View Related

Server :: Redirecting Output Of 'sendmail -bv' To Console?

May 3, 2011

When I run 'sendmail -bv', it sends the mail delivery status report as a mail to the root. Is there a way I can redirect this to the console instead of sending as a mail. requirement is to programatically find the mail host of the recipient for which I thought of using this 'sendmail -bv' command. Is there any other better way to find mail host of the recipient

View 12 Replies View Related

Ubuntu Multimedia :: Redirecting Pulseaudio Output Without Padevchooser

Jul 30, 2011

Today I tried to use padevchooser on Natty to send my laptop audio to my home media machine (which has the good speakers) using the "default server" option. Turns out padevchooser doesn't work on Unity and the threads I have seen say it is deprecated for other gui tools,

So what is the easy gui way to switch from my local pulse server to another one on my LAN, without using padevchooser, or switching off Unity? Or is this a regression?

View 2 Replies View Related

Ubuntu :: Redirecting Output From Printf Statement In C Program

May 22, 2010

I've got a C program that I've added some 'printf' statements to monitor a couple of variables. When I run this program manually or from a script, the output is displayed on screen. However, I need to change various variables in the 'test.c' file, run 'make clean' and 'make' a few hundred thousand times. I'm using a script to read the variables in and then using sed to do in-place edits of the file. Unfortunately, with this amount of iteration, it is getting rather tired!

Anyway, I've created a script that is working as long I respond to prompts. I've tried the following to no avail: Code: /path/to/script > /tmp/output /path/to/script > /tmp/output 2>&1 /path/to/script | tee (no output even after adding the -a option) In my C program, I have the following 'printf' statement: Code: printf ("variable1: $s variable2: $s",var1,var2); What am I missing? I've worked with redirection before and it's always worked out fine, but this one plain stumps!

View 2 Replies View Related

Programming :: Redirecting The Output Of Child Process To New Xterm?

Aug 2, 2010

I am developing a application. In this I fork() 3 childs(lets say child1 , child2, child3) . The parent is now waiting for some input from keyboard.Child3 is continously getting data from child1 and child2 using pipe which it then will print using printf.Now as the parent is waiting for input from user through keyboard while child3 is continously printing the data. I want to do it in different terminals.Can you please guide me how to proceed ahead so that on one terminal , the parent waits for input fromser while on other terminal child3 prints data.

View 1 Replies View Related

Programming :: Awk: Print Out A Message To The Screen When Redirecting The Output To File?

Mar 15, 2010

I have a problem when using awk:

e.g: awk '{processing text}' File1 > File2

But when I'm processing the File1, I want to print out some messages to the screen (not the File2). How can I do that?

View 5 Replies View Related

General :: RDP Port Redirecting From One Debian Through Another?

Mar 16, 2011

I have 2 debian linux PCson the same subnet/IP Range 192.168.100.0, 1st linux PC IP Address is 192.168.100.1, 2nd linux PC IP Address 192.168.100.9. 1st LINUX PC1st linux PC has 2 network interfaces, eth1 connected to Cisco Router, eth0 is for local LAN. No NAT on Cisco Router, iptables firewall on linux PC.2nd LINUX PC2nd Linux has 2 network interfaces, eth1 is connected to netgear router via bridge modereating a ppp0 connection. eth0 is for local LAN. No NAT on Netgear Router,s firewall on Linux PC.The 1st linux PC (192.168.100.1) is set as the gateway on the network. question -In what way can I redirect all RDP connections from the network via the 1st Linux PC (192.168.100.1) through to the 2nd Linux PC (192.168.100.9)

View 1 Replies View Related

General :: Redirecting Logs To Some Other Location?

Dec 5, 2009

I need with JBoss application Server.All I have JBOSS running without any issue.All I want is leading the Jboss logs to be deposited at /var/log/jboss.Say, if there are more than one instance running then create a seperate logs like /var/log/jboss-insta1, /var/log/jboss-insta2 etc.

View 2 Replies View Related

General :: Redirecting Or Piping 'somecommand?

Oct 31, 2010

kernel 2.6, slackware 12.0mkisofs 2.01If I do 'ls --help|more' all's well. 'mkisofs --help' outputs its help screen, and I can use Shift+PgUp/PgDn to scroll through it. But I can neither pipe it to more or to less, nor redirect it to some file. more is simply ignored. Less, gets into less but only the last screenful is seen. Redirection, i.e. 'mkisofs --help>john.txt' produces an empty file (size= 0).

View 2 Replies View Related

General :: Redirecting Serial Data To An External Devices Using Bluetooth?

Apr 24, 2010

i have the following challenge: i have a Bluetooth GPS device that i have connected to my linux notebook. but now i also want to use the same device (or better, GPS data stream) for my Navigation device (HP Ipaq with TomTom). make an serial port bluetooth service (sending) that my Navigation device can connect to. copy the incoming bluetooth serial port data stream to the outgoing bluetooth serial port.

i have already installed GPSD so i have the TCP port where the GPS data is available for everything on my notebook. but now i also want it to send it out through bluetooth.

1. is there someone out there who already did this?

2. how to make an bluetooth serial port service on Fedora 12?

3. how to copy a data stream from 1 device to the next device?

View 1 Replies View Related

General :: Getting Back To "stdin" After Redirecting A File To A Particular Program?

Nov 22, 2010

I need to achieve a particular effect using bash's redirection facilities.I know that I can redirect a file to some program's standard input:[user@host]$ application < file.txtThe thing is, I'd like to know can I regain control of this program's input after the file content's have been passed to it. In other words, I'd like to run a command similar to the above, and then, instead of the termination of the application, I'd want it to wait for further commands from standard input (keyboard).

As I write this question, it occured to me that I could probably write another application (or a script), that would at first write some data to standard output and then act as echo, like:[user@host]$ stdin_proxy.sh | applicationWould it work, and is there any better way to do so? There are a bunch of Googleable tutorials covering this issue, but they all amount to one advice - "reopen the stdin after the file contents have been read".

View 1 Replies View Related

General :: Redirecting STDOUT Of Previous Command To STDIN Of Next Command

Nov 20, 2009

i'm trying to redirect the output of a command to the input of the next command. not sure if i'm going about this the right way. an easy method would be just to store the output of the previous command in a file and redirect input to read that file, but i'm curious to see if this can be done without writing to any files.

View 9 Replies View Related

Applications :: Firefox Randomly Redirecting Me

Oct 3, 2010

Ever since I first installed OpenSuSE 11.2 on my pc firefox has been randomly redirecting me to weird web pages. It doesn't matter what website I try to visit whether it be this one or ..... or even my clan website, often times I will somehow randomly get redirected, sometimes before the page even fully loads. If I try to click the back button it just redirects me again and the only way I found to make it stop is to either X off the tab and then bring up a new one or go to another website and then go back to the one i wanted.

The majority of times it redirects me to what is likely either the worst advertisement for an antivirus program I have ever seen in my life, or the worst attempt at trying to convince people to download a virus I have ever seen in my life. In the tab it will come up with what is supposed to be the my computer folder and starts scanning various directories and detecting viruses (I wouldn't fall for this even If i was using windows). I don't know what happens after that I usually X it off.If anyone has any ideas about what could possibly causing this, or needs more information I would be grateful and happy to oblige.One last thing, firefox seems to be crashing ALL the time, not sure if this might be linked but it is really annoying.

View 9 Replies View Related

Networking :: Packet Redirecting To Another Interface Of The Box

Nov 19, 2010

I have to interfaces eth0(10.0.0.7) and wlan1(10.0.0.8) in my box. An application is listening (say, udp socket) at 10.0.0.7:5888.

Now if someone sends packet at 10.0.0.8:5888, I want to forward them to 10.0.0.7:5888.

I have tried this - iptables -t nat -A PREROUTING -p udp --dport 5888 -d 10.0.0.8 -j DNAT --to-destination 10.0.0.7

But Packets(with destination addr 10.0.0.8) are not received by the application (But they are received by the box, I have checked using wireshark). I have also enabled ip_forwarding.

View 1 Replies View Related

Networking :: Redirecting Ssl Requests With Squid?

Feb 24, 2010

say i have an apache server configured for ssl/non ssl virtual hosts and a proxy configured as follows (see squid.conf)the ssl on each name based virtual host is configured on its own port (only 7 of the domains need this the rest are just media and other insignificant bits of data but domains 1-7 contain forms that require specific personal information that may be technically illegal to transmit without encryption)if any additional information is needed just let me know

domain1 is port 443
domain2 is port 444
domain3 is port 445

[code]....

View 2 Replies View Related

Software :: Apache Redirecting Randomly?

Feb 16, 2010

an issue with my apache server. i have a perl script that does the load balancing using mapping. it has been working for years now but all of a sudden its redirects to the wrong place randomly and i havnt done any updates so nothing has changed.here i the redirect that i am talking about

RewriteCond %{REQUEST_URI} ^/mis/ [NC,OR]
RewriteCond %{REQUEST_URI} ^/mis$ [NC]
RewriteMap lb prg:/var/www/bin/lb.pl

[code]....

View 1 Replies View Related

Debian Installation :: Redirecting All Logs To Different Location

Jul 27, 2010

So 1 year ago I installed Lenny, but in the process of installation during the splitting of the drive I have mistakenly set a seperate parition for "/var/logs" instead of "/var/log". Is there any way to redirect all the logs to this seperate partition (var/logs) or it's better to go through the whole trouble* of installing Lenny again? *the trouble because it was hell of a problem to fix grub that didn't recognize SmartArray RAID (cciss driver), the problem is that I don't really remember how I fixed it. Symbolic link won't help since physically it will still be on the other partition. Do I have any other option?

View 3 Replies View Related

Ubuntu Multimedia :: Redirecting ALSA Over JACK 10.4 - 3

Sep 9, 2010

I finally ditched PulseAudio and set up my system with a realtime kernel. I'm redirecting ALSA over JACK. The good: - Awesome, I can get <5ms latency without any xruns! (although 23.2 msec as described below is just fine for me) The bad: - I'm a long-time linux audio user, but have got some minor issues which spoil the fun.

1. Without pulseaudio, the indicator applet refuses to show a volume control applet. The old gnome-volume-control-applet (the one with tooltip!) loads but doesn't show in the gnome-panel. Although I can set the volume with envy24control, it's not quite as practical as using the scrollwheel! Any way to fix this?

2. When I launching any application (such as a terminal) from the gnome-panel, a new JACK connection is created, but not cleaned up after closing the application. As a result, the QJackCtl connection list is flooded with alsa-jack.jackP.8528.xx connections (where 8528 is the process ID of gnome-panel). The jack_lsp command line program shows the same (added spaces after every : to get around the smiley filter):

[Code].....

View 3 Replies View Related

Ubuntu / Apple :: Internet Is Not Redirecting Properly

Feb 22, 2011

I have an Intel iMac 8,1

I Triple boot it with OS X, Windows 7 and Ubuntu 10.10

I use REFIT and everything was working find until yesterday :/

I was playing around with Ubuntu and I installed VirtualBox by Oracle just for the heck of it, after that my internet stopped working. Skype works fine, i can make calls and people appear as online or offline, every other web protocol does not work though. I have searched and other people have the problem, I changed my DNS servers, I flushed DNS etc. etc. I disabled IPv6 and changed my DNS to another one. I am stumped now.. The internet worked fine day before last, the only thing that I can think of that may have messed it up is Virtual Box, but I already deleted it. I really dont want to re-install because I have had bad experiences with uninstalling Ubuntu.

Also my sound does not work, currently I use an Altec Lansing system that is plugged into my Audio Jack behind my computer.

View 6 Replies View Related

Installation :: Bootable Floppy Disk Redirecting To USB?

Feb 10, 2010

I have a box that can not boot from USB, yet it can boot from floppy - how can I save the bootloader on a floppy and make it boot from USB?

View 1 Replies View Related

Networking :: Iptables REDIRECTing - All Outgoing Packets ?

Dec 6, 2010

I've been trying to redirect all outgoing packets (destined for a specified ip address) from my slack box back to itself. I thought this could be done with iptables, but if I fire up wireshark I can clearly see that the packets are getting out to the real server and I'm getting responses from it.

So here's what I tried:

All looks good and fine, and then I even try to visit 194.28.157.42 with firefox (by the way I am running a webserver, that is set to show a page when you visit 127.0.0.1) and I get an error page that reads: 502 Bad Gateway.

I ignored this message to see what the program I'm trying to interrupt does, and when I start wireshark and then start the program that is using that website, I can clearly see that the packets make it to the real 194.28.157.42 and get back responses.

View 1 Replies View Related

Server :: IPTABLES Port Redirecting To SQUID

Jul 12, 2011

i've got a software that uses a specific tcp port e.g 11111. i want to redirect all the traffic from 11111 to squid port 3128. i'm using the following commands to redirecting:

iptables -t nat -A PREROUTING -p tcp -m tcp -i eth0 --dport 11111 -j DNAT --to 192.168.0.1:3128
iptables -A FORWARD -p tcp -m tcp -i eth0 --dport 11111 -j ACCEPT

my ubuntu server has two interfaces. eth0 is for local network (dhcp assigns ips) and eth1 is for internet. my ubuntu server acts as a gateway and as an authentication server for users.

at squid also i have the following configuration regarding my port:

acl myport port 11111 http_access allow CONNECT myport. my squid installation is not transparent as users need to authenticate in order to access the web.

my application is a windows application and of course is not working. i examined the packets with wireshark and i noticed that when the program tries to access the internet, squid replies with err_invalid_request (the packet contains that data). the program is trying to send some plain text via port 11111 and as far as i can image, somehow squid declines the data. i cant get rid off squid as i want to pass the traffic from squid. what is the problem?

View 1 Replies View Related

Server :: Redirecting Boot Logs To Emails?

Nov 15, 2010

I am done with installing cron jobs for performing rebboting operations, now my requirement is sending the bootlogs to an email address.

View 1 Replies View Related







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