10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all, how read varaible and ouput in colum,
e.g.
$ echo $VAR1
opc op odi games gopher vcsa abrt
I like
$ echo $VAR1
opc
op
odi
games
gopher
vcsa
abrt (3 Replies)
Discussion started by: aav1307
3 Replies
2. Shell Programming and Scripting
i want to ask how can i read a variable?
like
for i in 1 2 3
do
cat file${1} | while read something
do
if
echo " file name: file${i}" >>temp
else
echo ", file${i}" >>temp
done
done
it is not working, can i do something like that?
actually i want the output below
file name:... (4 Replies)
Discussion started by: mingming88
4 Replies
3. Shell Programming and Scripting
Can I use the read command to read the contents of a variable? I'm trying by using the following code and getting nothing back. I'm in a Linux environment.
#!/bin/ksh
IFS=~
VAR1=1~2~3~4
echo $VAR1 | read a b c d
print "$a $b $c $d" (9 Replies)
Discussion started by: nmalencia
9 Replies
4. Programming
I was wondering if its possible to read mouse inputs using ioctl functions somehow ? If it is not too much of trouble can anyone write or even direct me to sample code of ioctl reading someother HID. (2 Replies)
Discussion started by: maverick_
2 Replies
5. Shell Programming and Scripting
Hello;
Please I need to read inputs from a file change 1 or 2 things the output to another file. (1 Reply)
Discussion started by: jimoney
1 Replies
6. Shell Programming and Scripting
need a script that goes something like this
#!/usr/bin/bash
echo "input up to TEN values, separated by spaces"
read vari1 vari2 vari3 vari4 vari5 vari6 vari7 vari8 vari9 vari10
#set null variables to 9999 (somehow?)
#now echo all variables
echo $vari1 $vari2 $vari3 $vari4 $vari5 $vari6... (1 Reply)
Discussion started by: ajp7701
1 Replies
7. Programming
Hi,
Is there any way to handle variable inputs.
If an application handles more than one input
how to print the input values.
Example :
./a.out 1 "hi" 3
./a.out 1
./a.out 1 3 4 "hello"
output should be:
1
hi
3
1 (1 Reply)
Discussion started by: yhacks
1 Replies
8. Shell Programming and Scripting
Hello,
I think its a sinple query but somehow i m stucked up here...
I am trying to enter n number of inputs from the user and write them in
an input file ie row wise...
I tried standard commands like
$echo "enter the inputs for the file"
$read var1 var2 var3 var4
test1 test2... (14 Replies)
Discussion started by: er_aparna
14 Replies
9. UNIX for Dummies Questions & Answers
Hi,
My problem is :
echo Division
read vDivision
variable1=`cut -c **something****'
echo Do you want to proceed ?
read ans
I cant seem to read in ans on the first try and have to repeatedly enter the return key. If i remove the ` ` statement its ok but i need that line for... (1 Reply)
Discussion started by: normie
1 Replies
10. UNIX for Advanced & Expert Users
Hi,
My problem is :
echo Division
read vDivision
variable1=`cut -c **something****'
echo Do you want to proceed ?
read ans
I cant seem to read in ans on the first try and have to repeatedly enter the return key. If i remove the ` ` statement its ok but i need that line for... (1 Reply)
Discussion started by: normie
1 Replies