redirection

Redirecting the output of both stdout and stderr?

I have one program, which writes its output to stderr and it also runs a executable internally which writes to stdout. I want to redirect the output of both to the same file using redirection operator something like "./a.out 2> output.txt", but this redirects the stderr, How to specify stdout also here. ...

How to activate new page on some event in MVVM-WPF?

Hi, I have a list page which list records in graphical representation. On clicking a some graphical portion or some button-which is added runtime on page- i want to activate new page by passing a some data as a parameter. Eg. I have Category list page, the UI representation is done at runtime. So clicking on some category I want to lis...

How to disable URL redirection in Python when using M2Crypto SSL?

This is what my code looks like: url_object = urlparse(url) hostname = url_object.hostname port = url_object.port uri = url_object.path if url_object.path else '/' ctx = SSL.Context() if ctx.load_verify_locations(cafile='ca-bundle.crt') != 1: raise Exception("Could not load CA certificates.") ctx.set_verify(SSL.verify_peer | SSL.verify...

Redirection Between View In MVVM

I am using MVVM patern for developing my WPF application. It working fine for unrelated pages, means how to go in another view from one view. Eg: I have one list page in which some records are coming from one ViewModel and another from another ViewModel, means I have two ViewModel form my single View. And now I want to display another ...

ASP.NET Webservice HTTP Redirect

My website posts orders to partner sites using web services. Recently, one of our partners implemented load balancing on their servers and our web requests are failing because they get redirected to other URLs. Normally when we test they pass because the URI is static but in production they fail because the requests get redirected. e.g...

IIS server redirect locations...

hi, I got a asp site hosted in a iis server. In the server there is a virtual folder products and whenever a url like xyz.com/products/abc_11.asp is provided it is forwared to xyz.com/product.asp?id=11 page. I would like to know from where we can change that settings? These settings or tasks can be done from where? Thnx ...

Can I capture stdout/stderr separately and maintain original order?

I've written a Windows application using the native win32 API. My app will launch other processes and capture the output and highlight stderr output in red. In order to accomplish this I create a separate pipe for stdout and stderr and use them in the STARTUPINFO structure when calling CreateProcess. I then launch a separate thread for ...

[C++] CreateProcessWithLoginW - Redirecting STDOUT

What I would like is to have the process start but have the input and output all be in the same console. if(CreateProcessWithLogonW(user,domain, pass, LOGON_WITH_PROFILE, NULL, cmd, 0, 0, 0, &sa, &pe)) { printf("[~] Process spawned with PID %X\n", pe.dwProcessId); } else { printf("[!] Failed to create process. Error Code: %X\n", GetL...

Mod Rewrite problem

.htacces Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^([a-zA-Z0-9_-]+)$ sinj.com.hr/index.php?var1=$1 [L] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ sinj.com.hr/index.php?var1=$1&var2=$2 [L] RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ sinj.com.hr/index.php?var1=$1&var2=$2&var3=$3 [L] Re...

BASH script passing stdin input to a program and giving control back to user input

(I looked everywhere for this, perhaps my googling skill is off today) I have a program that requires a handful of initialization cmds from stdin (and not through arguments). It'd be nice to move those commands into a script so when the script completes I can start keying the real work. So something like: cat initcmds.txt | myprogram.e...

Transferring Everything from One Domain to Another

I want to move from one domain to another one that is shorter and (hopefully) easier to remember, but I also want the transition to be as seamless as possible. I'm a coder so I know about 301 redirects and I intend to use them, but is there something easier than manually adding entries in my .htaccess file? The website is static with t...

How to supply many argv and outputredirection with one bash var ?

In file a.lst: in1.a in1.b > out1.a 2> out1.b in2.a in2.b > out2.a 2> out2.b In do.sh: CLI=$(sed -n -e "1 p" a.lst) perl a.pl $CLI I want to run like perl a.pl in1.a in1.b > out1.a 2> out1.b, how can I make it work ? ...

What is equivalent code for window.location in jQuery?

I am currently using window.location for client-side redirection in jQuery. Is there any equivalent syntax to do client-side redirection? ...

Retrieving stdin after using the redirection operator <

For a programming assignment, we have the following requirements: It needs to be a command-line program written in C. It needs to read text from a text document. However, we are to do this by using the Unix redirection operator < when running the program rather than having the program load the file itself. (So the program reads the tex...

Apache mod_rewrite question

Hi! I have an application running under tomcat 6. In front of it I have an apache server which is forwarding all requests. That is, the user "talks" to the apache and not to tomcat. For some reasons the it is requested the following: when the apache server receives a request of the form http://www.mydomain.com/myApp then it has to ...

Capturing the error stream from a sed command

Hello, How do I capture any error from a sed command into a file? Here is the sed command I am using: sed -e 's/'old_word'/'new_word'/' temp_file > output_file Now, when everything goes well, modified contents from temp_file are captured in output_file. But let's say that output_file happens to be read only. In this case, instead...

DNS File Mapping

Hi guys, I'm trying to work out a feature for a Web application, but I'm a bit confused at this point. I was wondering if anyone can shed some light on the following scenario. Say, my Web app is located at domain1.com and a users website is located at domain2.com. What I would like to allow is for the user to be able to map their domai...

I want all page requests to point to a single page

The wrinkle is that the pages being requested are aspx pages and they are no longer present. I want any request coming to the root domain (and any subdomain like www) to redirect to a single page in the root directory (namely index.html) I went into the IIS admin tool, selected the domain and tried to direct to a url (http://mydomain.com...

Using file contents as command line arguements in BASH

I'd like to know how to use the contents of a file as command line arguments, but am struggling with syntax. Say I've got the following: # cat > arglist src/file1 dst/file1 src/file2 dst/file2 src/file3 dst/file3 How can I use the contents of each line in the arglist file as arguments to say, a cp command? ...

Regular expression with RedirectMatch does anything

Hi I use .htaccess to perform redirection. Here the line RedirectMatch permanent .*\?langue=([\w]{2}).*id_([\w]+)=([1-9]+) ***[protocol]***://myserver/rootContext/action?pagename=dir1/dir2/dir3/Redirect&type=$2&id=$3&lang=$1 Here my inital url: ***[protocol]***://localhost/adir/anotherDir/anotherDirAgian/oneMore/apage.php?langue=fr...