10 More Discussions You Might Find Interesting
1. Programming
Hello,
I have snippet code from Lippman's <<C++ primer>>.
The program is to convert regular decimal (0 ~ 15) numbers to basic hexdecimals. The instruction tells the program will execute by hitting newline at the end. When I tried to run the compiled program, hitting ENTER did not work as... (3 Replies)
Discussion started by: yifangt
3 Replies
2. Shell Programming and Scripting
while read -a line; this is not working in ksh. what is the equivalent of this in ksh.
read: -a: unknown option (2 Replies)
Discussion started by: archana25
2 Replies
3. Shell Programming and Scripting
Hello,
I have used a chunk of ksh script similar to this in many places without any issue:
while :
do
print;
read OPTION?"Enter a number (q to quit): "
expr ${OPTION} + 1 >/dev/null 2>&1
CHECKVAL=$?
if }" != ${OPTION} ]; then
... (2 Replies)
Discussion started by: port43
2 Replies
4. Shell Programming and Scripting
Hi,
I try to read a multiline text from a console and write it to a file using a bash script. I want to end reading from a console if a user types the key twice. I tried this loop:
while read LINE; do
if 2>/dev/null; then
break
fi
echo -e ${LINE} >> $file
done
However, it doesn't... (8 Replies)
Discussion started by: wenclu
8 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I was writing a script to accept input using read. When I put !#/usr/bin/ksh in the beginning of the script, it accepts only 258 characters. And I remove it, it accepts more. I'm wondering what the difference is.
Thanks in advance, (7 Replies)
Discussion started by: swmk18
7 Replies
6. Shell Programming and Scripting
I have a log file like..
IMPORT from /dataserver/ftp/bits/mdr/mdr_data_discon.dat OF DEL .....
Number of rows read = 1376
Number of rows skipped = 0
Number of rows inserted = 1374
Number of rows updated = 0
Number of rows rejected = 2
Number of rows... (4 Replies)
Discussion started by: ramse8pc
4 Replies
7. UNIX for Dummies Questions & Answers
hi,
I'm a newbie to shell scripting. I wanted to initialise an array using basic for loop and read it.
Then i want to print it as a .CSV file..
Any help would me much appreciated.. (1 Reply)
Discussion started by: pravsripad
1 Replies
8. Shell Programming and Scripting
Hi All,
Is there any way to read the previous line in file reading ?
or
is there any way to read a line twice in KSH ?
thanks in advance !!
Srini (6 Replies)
Discussion started by: Srini75
6 Replies
9. Shell Programming and Scripting
any idea on how to timeout the read statement for ksh?
for bash u can use read -t option
-t timeout
Cause read to time out and return failure if a complete
line of input is not read within timeout seconds. This
option has ... (2 Replies)
Discussion started by: ashterix
2 Replies
10. UNIX for Dummies Questions & Answers
welll, the title quite explains what i want to do
thanks for your time! (4 Replies)
Discussion started by: kfaday
4 Replies