Hi gurus,
I have a question, need some of your inputs...
I have a command like this :
This works fine if the file test.dat is present but in case test.dat is not present (I intentionally remove the file), I want to redirect only the error to a specified error file like say test.err. For that I tried to do the following:
I still got the error as "wc: cannot open test.dat" at the command promprt and the file test.err was empty.
I also tried :
and I still got the error as "wc: cannot open test.dat" at the command promprt and the file test.err was empty.
My intention is only to redirect the error part of my command to a specific file say test.err and not display at the command prompt.
Hope I was clear.
Thanks for your time,
Carl
Last edited by Scott; 09-15-2011 at 04:50 PM..
Reason: Added code tags
I came across the following problem, where file contents are overwritten using redirection. Can somebody please explain what cat << BAR seems to be doing and say why this is a problem? Explain the contents and relation between the two filenames used before the cat command. thanks
/tmp# echo... (2 Replies)
Hi,
in my script I need to execute the following command:
query $id 456 432
but it waits for a RETURN character from keyboard and therefore, it fails. I tried something like:
query $id 456 432 << '\n'
but, i'ts clear it is not correct. Is there any way to do this?
Thxs. (0 Replies)
Hi all,
I am working with the Grinder tool (unrelated to my question) to redirect the output of a program to a file as follows:
java -cp $CLASSPATH net.grinder.TCPProxy > grinder.txt
This is a proxy server which pipes output to a file. When I do something on my proxy, more and more goes to... (1 Reply)
Hi all,
Maybe someone is able to help:
Need to redirect the output of a command in realtime to a second command. Command-A executes a remote shell to another host, and outputs its results. Command-B displays a "dialog" with the outputs of Command-A.
Command-A Output:
Updating FileA... (2 Replies)
I just wondered if I'm understanding this command line correctly
cat 2>save1 0<memo | sort 2>save2 1>letter
This means that stdin will read from memo and if there is an error then stderr will write to save1. Am I correct in saying that the sort command will sort the memo file and write... (2 Replies)
for shell operators like <, >, <<, and >> do the LHS always have to be a process or device and the RHS a file or device?
Is it possible for the RHS to be a process? (1 Reply)
I want to redirect stderr and have the following peice of code
$ cat t1.ksh
#!/bin/ksh
func2()
{
diff /tmp/jdlkwjdlkejew /tmp/djlkwejdlewdjew >$OUTPUT_FILE 2>>$ERR_FILE
}
func1()
{
let counter=0
while
do
print -u2 "Error: In main function"
func2
let... (1 Reply)
So I have a existing file that I used the uniq command on and I need to save the output to the same file without changing the file name.
I have tried $ uniq filename > filename
then when I cat the file it then becomes blank like there is nothing inside.
any help would be much appreciated... (0 Replies)
OS : AIX 6.1
Shell : Korn
in the url
https://forums.oracle.com/forums/thread.jspa?threadID=361463&tstart=0
I came across a crontab entry example
00 23 * * 1,3,5 <complete shell script path> 1> <log file> 2>&1
From googling , I gathered that
0 - stdin
1 - stdout
2 - stderr
I... (5 Replies)
Hi,
Can I get some explanation around this bash redirection?
From what I have read, x < y means call the shell to redirect the output of y into x.
Does this mean that this sequence of commands is executed from right to left?
diff <(sort testfile.txt) <(sort testfile2.txt)
Thanks,
edit... (2 Replies)
Discussion started by: sand1234
2 Replies
LEARN ABOUT DEBIAN
pactester
pactester(1)pactester(1)NAME
pactester - Tool to test proxy auto-config (pac) files.
SYNOPSIS
pactester <-p pacfile> <-u url> [-h host] [-c client_ip] [-e]
pactester <-p pacfile> <-f urlslist> [-c client_ip] [-e]
DESCRIPTION
pactester is a tool to test proxy auto-config (pac) files. It returns the proxy config string for the given URL and the pac file. pactester
uses pacparser C library for most of its functionality.
OPTIONS -p pacfile
PAC file to test. Specify "-" to read from the standard input.
-u url URL to test the PAC file for.
-h host
Host part of the URL. If not specified, it's determined from the URL.
-c client_ip
Client's IP address (as returned by the function myIpAddress() in PAC files). If not specified, it defaults to the IP address of
the machine on which this tool is running.
-e Enable Microsoft PAC extensions (dnsResolveEx, myIpAddressEx, isResolvableEx).
-f urlslist
A file containing the list of URLs to be tested. This is good for testing a PAC file against a set of URLs.
EXAMPLES
To find out the proxy config string for the pac file "wpad.dat" and the URL "http://www.google.com":
$ pactester -p wpad.dat -u http://www.google.com
For a client with IP address 10.0.12.123:
$ pactester -p wpad.dat -c 10.0.12.123 -u http://www.google.com
For a pac file hosted at http://wpad/wpad.dat:
$ curl -s http://wpad/wpad.dat | pactester -p - -u http://google.com
BUGS
If you have come across a bug in pactester, please submit a bug report at http://code.google.com/p/pacparser/issues/list.
AUTHOR
Written by Manu Garg (http://www.manugarg.com).
RESOURCES
Homepage: http://code.google.com/p/pacparser.
pactester(1)