06-30-2006
file content to standard output from a script
hi folks
how do i output contents of file in standard output.
in my script, i say
x=`cat filename'
echo $x
below is the actual file
***********
asda afdf fdf sdf dsfsdfsd fds dsfdfsdfsdg ssgd sgdg
sdfsdgfsdg dgfd gsfd gs sdg sfdg s
in my script, i am trying to output the contents of file to standard output
i am getting it as
filea fileb filec filed .profile
asda afdf fdf sdf dsfsdfsd fds dsfdfsdfsdg ssgd sgdg sdfsdgfsdg dgfd gsfd gs sdg sfdg s
there is no newline character and * is being replaced by each single file in the directory
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hey guys, need some help. Running AIX Version 5.2 and one of our cron jobs is writing errors to a log file. Any ideas on the following error message.
Error: Internal system error: Unable to initialize standard output file
I'm guessing more info might be needed, so let me know.
Thanks (2 Replies)
Discussion started by: firkus
2 Replies
2. Shell Programming and Scripting
Hi,
How to achieve this? Let us assume the following:
There are 2 scripts a.ksh and b.ksh
$ cat a.ksh
sh b.sh 2>&1 >> /work/log/a_log.txt
$ cat b.sh
echo "abcd"
My requirement is, is there a way to display this abcd in standard output also alongside of writing into a_log.txt?... (8 Replies)
Discussion started by: vigneshra
8 Replies
3. Shell Programming and Scripting
I have an xml file.
I am doing some change, say deleting line 770. File name is file.xml. I use:
sed '770d' file.xml
but this does not actually make changes in the *file* but shows the changes on standard output (screen)
if i use
$var=`sed '770d' file.xml`
echo $var > file.xml
this... (3 Replies)
Discussion started by: indianjassi
3 Replies
4. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
5. Shell Programming and Scripting
Hi guys,
i have a script named purgeErrors.ksh, when i execute this script i need to redirect the output to a log file in the same directory, how can i do that ??
-- Aditya (5 Replies)
Discussion started by: chaditya
5 Replies
6. Shell Programming and Scripting
Hi -
I have a file containing data like :-
cn=tommy,cn=users,c=uk
passwordexpirydate=20100530130623z
cn=jane,cn=users,c=uk
passwordexpirydate=20100423140734z
cn=michael,cn=users,c=uk
passwordexpirydate=20100331020044z
I want to end up with a file that looks like:-... (6 Replies)
Discussion started by: sniper57
6 Replies
7. Shell Programming and Scripting
Hi all .... vexing problem here ...
I am using sed to replace some special characters in a .txt file:
sed -e 's/_<ED>_/_355_/g;s/_<F3>_/_363_/g;s/_<E1>_/_341_/g' filename.txt
This command replaces <ED> with í , <F3> with ó and <E1> with á.
When I run the command to standard output, it works... (1 Reply)
Discussion started by: crumplecrap
1 Replies
8. UNIX for Advanced & Expert Users
Hi, When i run a script it is showing me the whole authentication and data to be copied on screen
server1:/sasdata/script#sh .TR_CNTO328.sh
**************************************************
*********************NOTICE***********************
This system is restricted to authorized users... (11 Replies)
Discussion started by: tushar_spatil
11 Replies
9. Red Hat
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies
10. Shell Programming and Scripting
I want to use a content of a file as standard input to a program and dump the output to a file. However, when I try the following code:
./program < input.in > output.out
The output.out is empty. So, how can I handle this problem?
Thanks in advance! (11 Replies)
Discussion started by: Ray Sun
11 Replies
LEARN ABOUT DEBIAN
autodia
autodia(3pm) User Contributed Perl Documentation autodia(3pm)
NAME
autodia - a perl script using the Autodia modules to create UML Class Diagrams or documents. from code or other data sources.
INTRODUCTION
AutoDia takes source files as input and using a handler parses them to create documentation through templates. The handlers allow AutoDia
to parse any language by providing a handler and registering in in autodia.pm. The templates allow the output to be heavily customised from
Dia XML to simple HTML and seperates the logic of the application from the presentation of the results.
AutoDia is written in perl and defaults to the perl handler and file extension matching unless a language is specified using the -l switch.
AutoDia requires Template Toolkit and Perl 5. Some handlers and templates may require additional software, for example the Java SDK for the
java handler.
AutoDia can use GraphViz to generate layout coordinates, and can produce di-graphs (notation for directional graphs) in dot (plain or
canonical) and vcg, as well as Dia xml.
Helpful information, links and news can be found at the autodia website - http://www.aarontrevena.co.uk/opensource/autodia/
USAGE
"autodia ([-i filename [-p path] ] or [-d directory [-r] ]) [options]"
"autodia -i filename : use filename as input"
"autodia -i 'filea fileb filec' : use filea, fileb and filec as input"
"autodia -i filename -p .. : use ../filename as input file"
"autodia -d directoryname : use *.pl/pm in directoryname as input files"
"autodia -d 'foo bar quz' : use *pl/pm in directories foo, bar and quz as input files"
"autodia -d directory -r : use *pl/pm in directory and its subdirectories as input files"
"autodia -d directory -F : use files in directory but only one file per diagram" =item "autodia.pl -d directory -C : use
files in directory but skip CVS directories"
"autodia -o outfile.xml : use outfile.xml as output file (otherwise uses autodial.out.dia)"
"autodia -O : output to stdout"
"autodia -l language : parse source as language (ie: C) and look for appropriate filename extensions if also -d"
"autodia -t templatefile : use templatefile as template (otherwise uses template.xml)"
"autodia -l DBI -i "mysql:test:localhost" -U username -P password : use test database on localhost with username and password as username
and password"
"autodia -l Mason -i "/index.html" -p comp_root -G '$c' : use HTML::Mason to fetch /index.html from comp_root and show all components in
reach. -G corresponds to allow_globals."
"autodia -z : output via graphviz"
"autodia -Z : output via springgraph"
"autodia -v : output via VCG "
"autodia -s skipfile : exclude files or packagenames matching those listed in file"
c<autodia -D : ignore dependancies (ie do not process or display dependancies)>
"autodia -K : do not display packages that are not part of input"
"autodia -k : do not display superclasses that are not part of input"
"autodia -H : show only Public/Visible methods"
"autodia -m : show only Class methods"
"autodia -M : do not show Class Methods"
"autodia -a : show only Class Attributes"
"autodia -A : do not show Class Attributes"
"autodia -S : silent mode, no output to stdout except with -O"
"autodia -h : display this help message"
"autodia -V : display version and copyright message"
perl v5.12.4 2011-05-23 autodia(3pm)