Sponsored Content
Top Forums Shell Programming and Scripting file content to standard output from a script Post 302078439 by bryan on Friday 30th of June 2006 11:59:00 AM
Old 06-30-2006
thanks

How can I send contents of a file to standard output inside a script and not loose the newline character?

Last edited by bryan; 06-30-2006 at 01:06 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error: Internal system error: Unable to initialize standard output file

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

Redirecting to standard output from within called script

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

Sed does not make changes in the file but to the standard output

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

Redirect Standard output and standard error into spreadsheet

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

How redirect standard output to a file

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

How to read file and only output certain content

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

sed command works from cmd line to standard output but will not write to file

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

Output file content

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

Command understanding the output file destination in case of standard output!!!!!

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

Use the content of a file as standard input

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
t_error(3)						     Library Functions Manual							t_error(3)

NAME
t_error() - produce error message SYNOPSIS
DESCRIPTION
The function produces a language-dependent message on the standard error output which describes the last error encountered during a call to a transport function. The argument string errmsg is a user-supplied error message that gives context to the error. The error message is written as follows: First if errmsg is not a null pointer and the character pointed to be errmsg is not the null character, the string pointed to by errmsg is written followed by a colon and a space. Then a standard error message string for the current error defined in is written. If has a value different from [TSYSERR], the standard error message string is followed by a newline character. If, however, is equal to [TSYSERR], the string is followed by the standard error message string for the current error defined in followed by a newline. The language for error message strings written by is implementation-defined. If it is in English, the error message string describing the value in is identical to the comments following the codes defined in The contents of the error message strings describing the value in are the same as those returned by the function with an argument of To simplify variant formatting of messages, the array of message strings is provided; can be used as an index in this table to get the mes- sage string without the newline. The variable is the largest message number provided for in the table. The error number, is only set when an error occurs and it is not cleared on successful calls. Valid States All - apart from Fork Safety is not fork-safe. RETURN VALUE
For XTI, upon completion, a value of 0 is returned. TLI does not return a value. ERRORS
No errors are defined for the function. EXAMPLES
If a function fails on transport endpoint fd2 because a bad address was given, the following call might follow the failure: The diagnostic message to be printer would look like: where identifies the specific error that occurred, and tells the user which function failed on which transport endpoint. FILES
NLS message catalog for TLI SEE ALSO
thread_safety(5). STANDARDS CONFORMANCE
t_error(3)
All times are GMT -4. The time now is 06:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy