Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

line(1) [netbsd man page]

line(1)                                                            User Commands                                                           line(1)

NAME
line - read one line SYNOPSIS
line DESCRIPTION
The line utility copies one line (up to and including a new-line) from the standard input and writes it on the standard output. It returns an exit status of 1 on EOF and always prints at least a new-line. It is often used within shell files to read from the user's terminal. EXIT STATUS
Exit status is: 0 Successful completion >0 End-of-file on input. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), read(2), attributes(5) SunOS 5.10 1 Feb 1995 line(1)

Check Out this Related Man Page

line(1)                                                            User Commands                                                           line(1)

NAME
line - read one line SYNOPSIS
line DESCRIPTION
The line utility copies one line (up to and including a new-line) from the standard input and writes it on the standard output. It returns an exit status of 1 on EOF and always prints at least a new-line. It is often used within shell files to read from the user's terminal. EXIT STATUS
Exit status is: 0 Successful completion >0 End-of-file on input. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), read(2), attributes(5) SunOS 5.10 1 Feb 1995 line(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create new file by searching another file

Hi , I need to write a korn shell to read a file, say Test.txt, and search the file for key words like "email", "name", etc line by line. Whatever is found on a line, send it to an output file. Do this until the end of the file. I have the following code below, that I'm trying to tweak but it... (13 Replies)
Discussion started by: leo
13 Replies

2. Shell Programming and Scripting

display result from user input

how can i only display the result according to user input? For example: i have a data file(in the attachement), when the user enter "1" it will only display whole records with pid from the data file matches to the users entered. (13 Replies)
Discussion started by: thms_sum
13 Replies

3. Shell Programming and Scripting

Read last line of file to check for value

Folks How best to read the last line of a file, to check for a particular value? This is the last line of my file...... 00000870000002000008 0000000020000 ......I need to check that this line contains '70' in positions 7 and 8, before I continue processing. Regards ... Dave (12 Replies)
Discussion started by: daveaasmith
12 Replies

4. Shell Programming and Scripting

Deleting a line from a flatfile using Shell Script

Hi All, Can Anyone please tell me,how can I delete a line from a file. I am reading the file line by line using whil loop and validating each line..Suppose in the middle i found a particular line is invalid,i need to delete that particular line. Can anyone please help. Thanks in advance,... (14 Replies)
Discussion started by: dinesh1985
14 Replies

5. Shell Programming and Scripting

While read line ignores the '\' in file content

I need to read temp.$i file content line by line through while loop but somehow the '\' do not appear in output.. Can someone guide how to read this exact content line by line in unix : if then cat temp.$i | head -1 # the file content appears fine while... (13 Replies)
Discussion started by: Prev
13 Replies

6. Shell Programming and Scripting

Add new line after ' char

Hello experts, I need to convert one file into readable format. Input file is like following line. STG,12345,000,999,' PQR, 2345,000,999,' XYZ,7890,000,999, Output should be following (After ' char new line char should be added.) STG,12345,000,999,' PQR, 2345,000,999,' ... (16 Replies)
Discussion started by: meetmedude
16 Replies

7. Shell Programming and Scripting

looping and saving output of each line separately

I have been trying this program for a long time. I am trying to read a file named "odon" line by line; read the first line, send it to do a command saved in a file "perm", once the first line has finished going through the content of the file perm, the result is saved with the number of the line.... (17 Replies)
Discussion started by: iconig
17 Replies

8. Shell Programming and Scripting

Read and write in the file

Hello Guys, How all are doing? I have an issue in Unix and want help from all of you I have a file in UNIX which it read by line by line , If at the end of line '0' is written the it should fetch that line into another file and change '0' to '1' and If at the end of line '1' is written then it... (10 Replies)
Discussion started by: adisky123
10 Replies

9. Shell Programming and Scripting

Commenting a specific line and inserting a new line after commented line.

Hello All, I have following file contents cat file #line=aaaaaa #line=bbbbbb #line=cccccc #line=dddddd line=eeeeee #comment=11111 #comment=22222 #comment=33333 #comment=44444 comment=55555 Testing script Good Luck! I would like to comment line line=eeeeee and insert a new line... (19 Replies)
Discussion started by: manishdivs
19 Replies

10. Shell Programming and Scripting

Comparing two files line by line

Hi All, I want to compare two files using shell script. One file will be input file and each line of input file will be compared against the other file. for e.g. File 1 10.3.242.170 saquatch Tesr.adc.unix.com jndi_p1 jndi_p1.unix.com 10.3.242.171 ness... (10 Replies)
Discussion started by: sharsour
10 Replies

11. Shell Programming and Scripting

How to process only new line of tail -f command from live log file?

Hi, I want to read a live log file line by line and considering those line which are newly added to file Below code I am using, which read line but as soon as it read new line from log file its starts processing from very first line of file. tail -F /logs/COMMON-ERROR.log | while read... (11 Replies)
Discussion started by: ketanraut
11 Replies

12. Shell Programming and Scripting

Adding new line to file

Hi everyone, currently I writing a script for comparing 2 variable in 2 line then output the line with equal value to new file. However, the new file only contain last line only, the earlier line was delete. I do google my problem but still not find the way out. Sorry for my English. Thank you... (10 Replies)
Discussion started by: lazy_bear
10 Replies

13. UNIX for Beginners Questions & Answers

Performance issue to read line by line

Hi All- we have performance issue in unix to read line by line. I am looking at processing all the records. description: Our script will read data from a flat file, it will pickup first four character and based on the value it will set up variables accordingly and appended the final output to... (11 Replies)
Discussion started by: balu1729
11 Replies

14. UNIX for Dummies Questions & Answers

Performance issue to read line by line

(11 Replies)
Discussion started by: balu1729
11 Replies

15. UNIX for Beginners Questions & Answers

Read 2 file line by line @ same time

HI All, I am aware of reading one file line by line but now my requirement is to read 2 file line by line as below explained. I have 2 files as below file 1 with spaces and file 2 same as file1 but without space and () brackets now i have to read both file line by line and use first line of... (13 Replies)
Discussion started by: abhaydas
13 Replies