10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. UNIX for Dummies Questions & Answers
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
5. UNIX for Dummies Questions & Answers
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
6. UNIX for Dummies Questions & Answers
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
7. Shell Programming and Scripting
'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
8. Shell Programming and Scripting
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
9. UNIX for Dummies Questions & Answers
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
10. UNIX for Dummies Questions & Answers
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