10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I tried to make of "line returns" with "\n" :
read -p $'Do you really want append this line in '$CONFIG_FILE''\n'IP CLIENT: '$IP_INPUT' - PATH: '$PATH_INPUT''\n'y/n ?:' CONFIRM_INPUT
But it didn't work, please anyone have an idea? :b: (2 Replies)
Discussion started by: Arnaudh78
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
Hi everybody, I am new to shell script. Please help me with this problem.
I have a file test.txt with the content like this:
I have a shell script test.sh like this
while read line
echo $line >> out.txt
done < test.txt
out.txt is expected to have the same content... (10 Replies)
Discussion started by: Dark2Bright
4. UNIX for Dummies Questions & Answers
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
5. Shell Programming and Scripting
I have this archive: cat file.txt
archive test 02 sequence 03 02length 52
archive test 02 sequence 04 02length 52
archive test 02 sequence 05 02length 52
teste arquivo 06 sequencia 08 06 length 54
teste arquivo 06 sequencia 09 ... (8 Replies)
Discussion started by: cewa67
6. Shell Programming and Scripting
I have this simple script
while read name
ssh $name "hostname > /tmp/$name.txt"
ssh $name "/opt/ignite/bin/print_manifest | grep Main >> /tmp/$name.txt"
ssh $name "getconf MACHINE_SERIAL >> /tmp/$name.txt"
ssh $name "ioscan -kfnC processor | grep processor | wc -l >>... (3 Replies)
Discussion started by: Andyp2704
Can any one please help me with this. Am struggling hard to get a solution.
I am doing telnet through a C program and getting the stdout file descriptor of the remote machine to pipe.
read() function is getting data, But whenl it receives SOH character ie. ^A ( Start of heading = Console... (2 Replies)
Discussion started by: JDS
I met problem with using read() & write(). I m trying to use read twice on client first time is the size of buffer, 2nd time is the buffer. I think I have to, coz I dnot know file size. So, I write twice on server as well -- 1st, filesize; 2nd, buffer.
The problem is, sometimes,... (11 Replies)
Discussion started by: EltonSky
9. Shell Programming and Scripting
I've discovered a very annoying problem in sh:
echo -en "one\ntwo\nthree" | while read VALUE
done This will print one and two, but not three. The last line is IGNORED because it lacks a newline. This makes it hard to use sh for things like CGI scripting; you have... (6 Replies)
Discussion started by: Corona688
10. Shell Programming and Scripting
Hi, I'm doing a script that reads lines from a file and then copy them to another file, if the user wants it.
But I'having problems to get the user selection because when I do the read to ask the user, the script reads the next line of the file.
The script looks like this:
# ... (2 Replies)
Discussion started by: pmpx