Sponsored Content
Top Forums UNIX for Dummies Questions & Answers need help on how to read command in unix Post 302196661 by era on Monday 19th of May 2008 06:34:14 AM
Old 05-19-2008
read simply reads standard input. You probably want to use redirection.

Code:
while read line; do
  echo "Read line '$line'"
done <file

Without concrete information about which particular string at which particular position, it's hard to do anything useful inside that loop, but it should hopefully be enough to get you started.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

while using read command I want too.....

This is the greatest site ever, only my second day of use and the responses and advice I got from yesterdays question were great.. Now for todays question, I have a file that I want to read one line at a time into a script i've written. Once I have read the line I would like to update it (in... (1 Reply)
Discussion started by: nhatch
1 Replies

2. UNIX for Dummies Questions & Answers

Read Command

i need to create a script that inputs information from another file using the read command. Sounds easy enough but i can't figure it out, can anyone help me? (2 Replies)
Discussion started by: Woodbird25
2 Replies

3. Shell Programming and Scripting

AWK : read unix command

Hi, Is there a way to have something working like the read Unix command to stop a awk ask a question and get the result. I've try system("read a") but it does not work. Thanks. Franck. (6 Replies)
Discussion started by: fwirbel
6 Replies

4. Shell Programming and Scripting

read command

'Morning vmstat 1 1|sed 1,2d|awk '{printf("%s\n",$1)}'|read var echo $var This syntax run on AIX (ksh) but not on linux (bash). I think that problem is the read command, because the following syntax is ok : vmstat 1 1|sed 1,2d|awk '{printf("%s\n",$1)}' Could someone help me! regards... (16 Replies)
Discussion started by: nymus7
16 Replies

5. UNIX for Dummies Questions & Answers

Read command

Hi everyone, I have problem while writing a shell script for linux (Red Hat). First I need to create a read command. I tried to google this but so far I can't sort this out. I hope you will be able to help me. I have to read a file like this : GESTION_DATA_SET_variable1_variable2 ... (2 Replies)
Discussion started by: Aswex
2 Replies

6. UNIX for Dummies Questions & Answers

read command - using output from command substitution

Hey, guys! Trying to research this is such a pain since the read command itself is a common word. Try searching "unix OR linux read command examples" or using the command substitution keyword. :eek: So, I wanted to use a command statement similar to the following. This is kinda taken... (2 Replies)
Discussion started by: ProGrammar
2 Replies

7. UNIX for Dummies Questions & Answers

Read all files in a directory for a unix command

Hello, Below, I have a unix command, which can be executable for single file. cat input.txt | sort -k3,3 > output.txt I have 100 input files in a directory. It is hectic and time taking to run the above command for all the 100 files for 100 times. Now, I want to execute the above unix... (2 Replies)
Discussion started by: koneru_18
2 Replies

8. Shell Programming and Scripting

Help with UNIX READ command usage..

Tested on : bash Will be implementing on : ksh I dont know if this is weird , or my idea of Unix stdin or stdout is completely messed up , but if I use the following command, I am getting a proper output. ls -l | head -1 | while read a ; do echo $a ;done and the output is soemthing like... (5 Replies)
Discussion started by: kumarjt
5 Replies

9. Shell Programming and Scripting

Read from file and execute the read command

Hi, I am facing issues with the below: I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,). Now i want to read this command from file and execute it. So my code below is : Contents in the lookup.lkp file is : c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Discussion started by: vital_parsley
7 Replies

10. UNIX for Beginners Questions & Answers

Need help with read command

Is there a way to make the input of the read command (or some similar command that I'm unaware of) not visible, or with an astrix?? An example: #!/bin/bash # Example echo; echo "Who are you??"; read name if ; then echo "Welcome, the terminal is yours."; exit else "Stranger... (2 Replies)
Discussion started by: Huitzilopochtli
2 Replies
SSL_rstate_string(3SSL) 					      OpenSSL						   SSL_rstate_string(3SSL)

NAME
SSL_rstate_string, SSL_rstate_string_long - get textual description of state of an SSL object during read operation SYNOPSIS
#include <openssl/ssl.h> const char *SSL_rstate_string(SSL *ssl); const char *SSL_rstate_string_long(SSL *ssl); DESCRIPTION
SSL_rstate_string() returns a 2 letter string indicating the current read state of the SSL object ssl. SSL_rstate_string_long() returns a string indicating the current read state of the SSL object ssl. NOTES
When performing a read operation, the SSL/TLS engine must parse the record, consisting of header and body. When working in a blocking environment, SSL_rstate_string[_long]() should always return "RD"/"read done". This function should only seldom be needed in applications. RETURN VALUES
SSL_rstate_string() and SSL_rstate_string_long() can return the following values: "RH"/"read header" The header of the record is being evaluated. "RB"/"read body" The body of the record is being evaluated. "RD"/"read done" The record has been completely processed. "unknown"/"unknown" The read state is unknown. This should never happen. SEE ALSO
ssl(3) 1.0.0e 2001-08-23 SSL_rstate_string(3SSL)
All times are GMT -4. The time now is 04:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy