Sponsored Content
Full Discussion: File handling in UNIX
Top Forums UNIX for Dummies Questions & Answers File handling in UNIX Post 71926 by VENC22 on Tuesday 17th of May 2005 06:40:15 AM
Old 05-17-2005
File handling in UNIX

Hi All,
I want to read a file in UNIX line by line.

Can u suggest me any command for this?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

handling spaces in unix

I am testing a ksh script for email. In the script I receive several parameters. One of them is a subject. The subject may contain spaces. Ex. Test this. When I am running the script on telnet to test, how should the syntax at the command line be written. I have this: ksh ResendE.sh '001111'... (2 Replies)
Discussion started by: supercbw
2 Replies

2. UNIX for Dummies Questions & Answers

VARIABLE HANDLING in UNIX

Hi All, :confused: can anyone throw some light on variable handling in UNIX script?? I want to know about the local variables we declare inside the UNIX script. e.g. i=10 OR cat file1 | while read line do echo $line done etc. Does UNIX have any data types Can some one... (1 Reply)
Discussion started by: VENC22
1 Replies

3. Shell Programming and Scripting

File handling, getopts command in unix

I need to create a shell script having the menu with few options such as 1. Listing 2. Change permissions 3. Modify Contents 4. Delete Files 5. Exit 1. For 1. Listing: Display a special listing of files showing their date of modification and access time (side by side) along with their... (2 Replies)
Discussion started by: bab123
2 Replies

4. Shell Programming and Scripting

Help needed in switch case handling in UNIX

Hi, In below code, i am expecting the output has Bye Bye But i am getting has Bye Hi Code: #!/usr/bin/bash var="Hi" cat txt.txt | while read var1 do next="Bye" case $var in Hi) (1 Reply)
Discussion started by: Balamani
1 Replies

5. UNIX for Dummies Questions & Answers

Socket Handling Differences Between Linux & Unix?

Sorry if this is a stupid question! I have been developing a Java application that I am deploying on both Unix and Linux servers, which uses lots of socket handling. When the server side connection is dropped by the server un-gracefully I have been seeing close_waits and null connections. ... (0 Replies)
Discussion started by: Vinnie
0 Replies

6. Shell Programming and Scripting

Error handling in Unix shell scripting

Hello, I have written a shell script and suppose there is any error in the script. How i can do exception handling in shell script.for example i have below code sqlplus -s <<uid>>/<<pwd>>@<<$ORACLE_SID>> <<EOF > 1_pid1.log set pagesize 0 set feedback off set heading off set linesize 200... (1 Reply)
Discussion started by: rksingh003
1 Replies

7. UNIX for Dummies Questions & Answers

File Handling in UNIX

Hi all, I have a requirement here where I am dealing with a dynamic file. Each record in the file can contain anywhere between 1(min) to 42(max) Reject codes. For example I may have one record in the file having 3 reject codes and another record having 5 reject codes. The reject codes will be... (2 Replies)
Discussion started by: sujainarayan
2 Replies

8. Shell Programming and Scripting

UNIX File handling -Issue in reading a file

I have been doing automation of daily check activity for a server, i have been using sqls to retrive the data and while loop for reading the data from the file for several activities. BUT i got a show stopper the below one.. where the data is getting store in $temp_file, but not being read by while... (1 Reply)
Discussion started by: KuldeepSinghTCS
1 Replies

9. Programming

Please help:program hang stuck there signal handling on POSIX Message Queue UNIX C programming

in a single main() function,so need signal handling. Use Posix Message Queue IPC mechanism , can ignore the priority and other linked list message,to implement the scenario: client:Knock Knock server:who's there client: Eric Server:Eric,Welcome. client:exit all process terminated ... (1 Reply)
Discussion started by: ouou
1 Replies

10. Shell Programming and Scripting

UNIX file handling issue

I have a huge file semicolon( ; ) separated records are Pipe(|) delimited. e.g abc;def;ghi|jkl;mno;pqr|123;456;789 I need to replace the 50th field(semicolon separated) of each record with 9006. The 50th field can have no value e.g. ;; Can someone help me with the appropriate command. (3 Replies)
Discussion started by: Gurkamal83
3 Replies
logger(1)						      General Commands Manual							 logger(1)

NAME
logger - Makes entries in the system log SYNOPSIS
/usr/bin/logger [-f file] [-i] [-p[facility.]priority] [-t tag] [message...] logger [-b] [message...] STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: logger: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
[Tru64 UNIX] Logs the informational message to the binary event logger instead of the syslog() subroutine and enters information in the binary event log file. The uerf command with the -r 250 option reports the informational messages that are in the binary event log file, which is used for system maintenance and troubleshooting. The -b option cannot be used with any other options. [Tru64 UNIX] Logs all lines in file. [Tru64 UNIX] Logs the process ID (PID) of the logger process with each line. [Tru64 UNIX] Enters the message with the specified priority and, if specified, from the specified facility. [Tru64 UNIX] You can specify priority as either an alphabetic string or its integer equivalent. You can specify the following val- ues for the priority variable: [Tru64 UNIX] (0) [Tru64 UNIX] The system is unusable. (0) [Tru64 UNIX] Action must be taken imme- diately. (1) [Tru64 UNIX] Critical conditions. (2) [Tru64 UNIX] Error conditions. (3) [Tru64 UNIX] (3) [Tru64 UNIX] (4) [Tru64 UNIX] Warning conditions. (4) [Tru64 UNIX] Normal but significant condition. (5) [Tru64 UNIX] Informational. (6) [Tru64 UNIX] Debug-level messages. (7) [Tru64 UNIX] You can also specify a value for the facility variable, which indicates the source of the event. You can specify facility as either an alphabetic string or its integer equivalent. The integer values appear in parentheses. You can specify the following values for the facility variable: [Tru64 UNIX] Kernel messages. (0) [Tru64 UNIX] Random user-level messages. (8) [Tru64 UNIX] Mail system. (16) [Tru64 UNIX] System daemons. (24) [Tru64 UNIX] Security/authorization messages. (32) [Tru64 UNIX] (32) [Tru64 UNIX] Messages syslogd generates internally. (40) [Tru64 UNIX] Line printer subsystem. (48) [Tru64 UNIX] Network news subsystem. (56) [Tru64 UNIX] UUCP subsystem. (64) [Tru64 UNIX] Clock daemon. (72) [Tru64 UNIX] (128) [Tru64 UNIX] (136) [Tru64 UNIX] (144) [Tru64 UNIX] (152) [Tru64 UNIX] (160) [Tru64 UNIX] (168) [Tru64 UNIX] (176) [Tru64 UNIX] (184) [Tru64 UNIX] Precedes each entry in the log with tag. OPERANDS
You can specify the message to be used for entries on the command line or with the -f file option, which specifies that each line in file be logged as an entry. If you do not specify message or -f, logger reads standard input. DESCRIPTION
The logger command makes the specified entries in the system log file. The logger command provides a program and shell script interface to the syslog() subroutine. The file in which entries are made depends on the current system log configuration; see syslog and syslogd for more information. NOTES
The effects of the environment variable LC_MESSAGES apply only to diagnostic messages generated by logger, and not to any messages written by the use of the command. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. EXAMPLES
To log the system reboot, including the process ID of the process running logger, enter: logger -i System rebooted To log each line in the file build.events with the tag trial build preceding them, enter: logger -f build.events -t "trial build" The following commands are equiv- alent and enter events of warning priority to the log: logger -p warning logger -p 4 The following commands are equivalent and enter events from the daemon facility of warning priority: logger -p daemon.warning logger -p 24.4 To specify the debug priority with a priority name, enter: logger -p debug my message To specify the debug priority with a priority number, enter: logger -p 7 my message To specify both debug priority and the user facility, enter: logger -p user.debug my message To specify the same facility/priority pair using numeric values, enter: logger -p 8.7 my message You can also combine alphabetic and numeric specifications: logger -p user.7 my message logger -p 8.debug my message ENVIRONMENT VARIABLES
The following environment variables affect the execution of logger: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization variables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments). Determines the locale for the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: binlogd(8), syslogd(8), uerf(8) Functions: syslog(3) Standards: standards(5) logger(1)
All times are GMT -4. The time now is 07:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy