Sponsored Content
Top Forums Shell Programming and Scripting Command output redirection to file issues Post 302999194 by RudiC on Thursday 15th of June 2017 07:03:51 AM
Old 06-15-2017
Well, looking into my personal and reliable crystal bowl after a careful and painstaking polish, I can see the answer: "Correct the subsequent block's output redirection!"
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Redirection of output to a log file

Apologies for the trivial nature of this question but I cannot seem to get a simple re direct to a log file to work Step 1 touch log.txt at -f batch.sh now >> log.txt I am trying to get the batch.sh contents into the log file Manny Thanks (8 Replies)
Discussion started by: JohnCrump
8 Replies

2. Shell Programming and Scripting

Remote server file output redirection

Hi, I want ssh to the remote server and then execute ls and redirect the output to the file in remote server itself like ssh root@$server `ls /var/log/users.txt > root@$server:/home/users.txt` Can you please let me know the correct syntax for it. Thanks in advance (2 Replies)
Discussion started by: mohitmoudgil
2 Replies

3. UNIX for Dummies Questions & Answers

Output file redirection

Suppose I have a file named a When I write cat a>a The following error message is displayed cat: a: input file is output file and my file a is truncated to zero size. Also the exit status of the last command is 1 Can someone tell me what actually happens when I do so? (1 Reply)
Discussion started by: aagajaba
1 Replies

4. UNIX for Dummies Questions & Answers

Capping output redirection log file length

I am trying to write a script which will output notifications to a logfile, but I would like to cap the logfile to, let's say, 200 lines. Specifically I am using custom firmware, DD-wrt, on my router and I am implementing a script to connect to my work vpn. I have a loop that pings a computer... (2 Replies)
Discussion started by: joemommasfat
2 Replies

5. Shell Programming and Scripting

awk output redirection to file

I have a system stat command running which generates data after 5 sec or so. I pass this data to awk and do some calculation to present the data differently. Once done now I want to pass this data to file as and when generated but doesn't work..unless the first command completes successfully.... (6 Replies)
Discussion started by: learnscript
6 Replies

6. Shell Programming and Scripting

Help with tar --append command output redirection

I am using tar command to append daily database backups on tape. "tar --append " command help me to do this. But tar --append command does not produce any output on stdout if it succeed. I want the output for that appended command to a log file. This log file should contain only the name of the... (0 Replies)
Discussion started by: pganguly46
0 Replies

7. Shell Programming and Scripting

output redirection to existing file question

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)
Discussion started by: drew211
0 Replies

8. UNIX and Linux Applications

output redirection command

Dear All, ./waf --run scratch/myfirst > log.out 2>&1 The above is a command line to redirect the output to a file called log.out. what is the 2>&1 part for ? Thank you (2 Replies)
Discussion started by: knowledgeSeeker
2 Replies

9. Shell Programming and Scripting

Command output redirection in script not working

I need to count the number of lines in a .txt file and put it in a variable. I am using the following code #!/bin/bash count = $(wc -l "some file.txt" | awk '{print$1}') echo $count It is giving the following error. line3: count: command not foundWhat am I doing wrong here? :confused: (7 Replies)
Discussion started by: haritha.gorijav
7 Replies

10. Shell Programming and Scripting

Output redirection of c binary file to a file in shell script is failing

I am struck up with a problem and that is with output redirection. I used all the ways for the redirection of the output of c binary to a file, still it is failing. Here are the different ways which I have used: ./a.out | tee -a /root/tmp.txt 2>&1 ./a.out | tee -a /root/tmp.txt 1>&1 ./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies
XMLCATALOG(1)															     XMLCATALOG(1)

NAME
xmlcatalog - Command line tool to parse and manipulate XML or SGML catalog files. SYNOPSIS
xmlcatalog [--sgml --shell --create --del VALUE(S) [ --add TYPE ORIG REPLACE --add FILENAME] --noout --no-super-update [-v --verbose]] {CATALOGFILE} {ENTITIES...} DESCRIPTION
xmlcatalog is a command line application allowing users to monitor and manipulate XML and SGML catalogs. It is included in libxml(3). Its functions can be invoked from a single command from the command line, or it can perform multiple functions in interactive mode. It can operate on both XML and SGML files. OPTIONS
xmlcatalog accepts the following options (in alphabetical order): --add TYPE ORIG REPLACE Add an entry to CATALOGFILE. TYPE indicates the type of entry. Possible types are: public, system, rewriteSystem, rewriteURI, delegatePublic, delegateSystem, nextCatalog. ORIG is the original reference to be replaced, and REPLACE is the URI of the replacement entity to be used. The --add option will not overwrite CATALOGFILE, outputting to stdout, unless --noout is used. The --add will always take three parameters even if some of the XML catalog constructs will have only a single argument. --add FILENAME If the --add option is used following the --sgml option, only a single argument, a FILENAME, is used. This is used to add the name of a catalog file to an SGML supercatalog, a file that contains references to other included SGML catalog files. --create Create a new XML catalog. Outputs to stdout, ignoring filename unless --noout is used, in which case it creates a new catalog file filename. --del VALUE(S) Remove entries from CATALOGFILE matching VALUE(S). The --del option will not overwrite CATALOGFILE, outputting to stdout, unless --noout is used. --noout Save output to the named file rather than outputting to stdout. --no-super-update Do not update the SGML super catalog. --shell Run a shell allowing interactive queries on catalog file CATALOGFILE. For the set of available commands see the section called "SHELL COMMANDS". --sgml Uses SGML super catalogs for --add and --del options. -v, --verbose Output debugging information. SHELL COMMANDS
Invoking xmlcatalog with the --shell CATALOGFILE option opens a command line shell allowing interactive access to the catalog file identified by CATALOGFILE. Invoking the shell provides a command line prompt after which the following commands (described in alphabetical order) can be entered. add TYPE ORIG REPLACE Add an entry to the catalog file. TYPE indicates the type of entry. Possible types are: public, system, rewriteSystem, rewriteURI, delegatePublic, delegateSystem, nextCatalog. ORIG is the original reference to be replaced, and REPLACE is the URI of the replacement entity to be used. The --add option will not overwrite CATALOGFILE, outputting to stdout, unless --noout is used. The --add will always take three parameters even if some of the XML catalog constructs will have only a single argument. debug Print debugging statements showing the steps xmlcatalog is executing. del VALUE(S) Remove the catalog entry corresponding to VALUE(S). dump Print the current catalog. exit Quit the shell. public PUBLIC-ID Execute a Formal Public Identifier look-up of the catalog entry for PUBLIC-ID. The corresponding entry will be output to the command line. quiet Stop printing debugging statements. system SYSTEM-ID Execute a Formal Public Identifier look-up of the catalog entry for SYSTEM-ID. The corresponding entry will be output to the command line. ENVIRONMENT
XML_CATALOG_FILES XML catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the XML_CATALOG_FILES environment variable to a list of catalogs. An empty one should deactivate loading the default /etc/xml/catalog catalog. DIAGNOSTICS
xmlcatalog return codes provide information that can be used when calling it from scripts. 0 No error 1 Failed to remove an entry from the catalog 2 Failed to save to the catalog, check file permissions 3 Failed to add an entry to the catalog 4 Failed to look up an entry in the catalog SEE ALSO
libxml(3) More information can be found at o libxml(3) web page http://www.xmlsoft.org/ o libxml(3) catalog support web page at http://www.xmlsoft.org/catalog.html o James Clark's SGML catalog page http://www.jclark.com/sp/catalog.htm o OASISXML catalog specification http://www.oasis-open.org/committees/entity/spec.html AUTHOR
John Fleck <jfleck@inkstain.net>. libxml2 $Date: 2006/08/21 08:34:11 $ XMLCATALOG(1)
All times are GMT -4. The time now is 10:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy