02-24-2005
This prints
TEST_1
I want it to print the value of TEST_1
10.2.3.4
Thanks,
Sabina
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a variable that is outputting a lot of space.
here has been 45 lines returned ...
how can I remove the spaces between the "been and the 45"
CODE:
fil_len=`wc -l < coshb.txt`
if ; then
cat coshb.txt | more
echo " "
echo "There has been ${fil_len} lines... (4 Replies)
Discussion started by: jagannatha
4 Replies
2. Shell Programming and Scripting
I am modifying an existing script and it has the following line:
export SomeEnvVar=`echo ${SomeLocalVar}`
Why wouldn't it just read:
export SomeEnvVar=${SomeLocalVar}
Is there some reason to use echo instead of a direct assignment? :confused: (2 Replies)
Discussion started by: shellburger
2 Replies
3. Shell Programming and Scripting
Hi everyone,
I am trying to create a simple batch file to make SQL backups. this part of it works fine. Currently the script can mysql dump the databases, compress them, delete the .sql, compress the individual tar.gz into one larger one, delete the smaller files, encrypt the final tar.gz and... (1 Reply)
Discussion started by: luma
1 Replies
4. Shell Programming and Scripting
$total=500
echo "scale=2; $val1*100/$total" | bc
echo "scale=2; $val2*100*100/$total" | bc
echo "scale=2; $val3*100/$total" | bc
I want to make the above code to be accomplish in a single echo line.
For instance output:21.3, 44.2, 51.6
How to achieve that, some one please help, i just... (5 Replies)
Discussion started by: alvin0618
5 Replies
5. Shell Programming and Scripting
Hi,
i want to create an user-friendly script where you are asked for two numbers. i would like that these two number to be separated with "--" for example, but i can't figure out how to do this.
for example
read -p "Insert lowest and highest value: " min ; echo -n "-- "; read max
so... (3 Replies)
Discussion started by: ezitoc
3 Replies
6. UNIX for Dummies Questions & Answers
I've testing the following code:
echo test.txt | cut -d . -f1and get the output "text"
So why can't i assign the command to a variable?
VAR='"echo test.txt | cut -d . -f1"'
echo $VAR (5 Replies)
Discussion started by: jl487
5 Replies
7. Shell Programming and Scripting
Hi,
I'm new here so I want to say hello to everyone first!
I searched google and this forum for a similar problem, but wasn't successful
#! /bin/bash
I'm trying to output (echo) n lines of a text file to the screen (later into another file).
But I have problem with the sed command, it won't... (1 Reply)
Discussion started by: studiologe
1 Replies
8. Shell Programming and Scripting
#!/bin/bash
varA="AAA1"
varB="BBB2"
varC="CCC3"
for proccx in $varA $varB $varC
do
echo "the current name is ????? , the value is $proccx"
echo " "
done
#end of script
I want the output to look something like this:
the current name is varA, the value is AAA1
the current name is... (5 Replies)
Discussion started by: ajp7701
5 Replies
9. Shell Programming and Scripting
if
then
echo "Entry Valid : ${x_oug}"
else
echo "Entry Invalid : " 0
fi
In the above code the 3rd line is not working... it does not print anything
I tried following as well .. but no luck!
echo "Entry Valid : ... (13 Replies)
Discussion started by: Chetanz
13 Replies
10. Shell Programming and Scripting
Stumped with the formatting of the awk output when used with variables, e.g.:
awk -F, 'BEGIN {OFS=","} print {$2,$3,$4}' $infile1
produces the desired output (with rows), but when echoing the variable below, the output is one continuous line
var1=$(awk -F, 'BEGIN {OFS=","} print... (4 Replies)
Discussion started by: ux4me
4 Replies
LEARN ABOUT DEBIAN
pqlist
PQLIST(1) pqlist PQLIST(1)
NAME
pqlist - List available NetWare print queues
SYNOPSIS
pqlist [ -h ] [ -S server ] [ -U user name ] [ -P password
| -n ] [ -C ] [ pattern ]
DESCRIPTION
pqlist lists all the NetWare print queues available to you on some server. If you are already connected to some server, this one is used.
If pqlist does not print to a tty, the decorative header line is not printed, so that you can count the printing queue available on your
server by doing
pqlist -S server | wc -l
pqlist looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information.
Please note that the access permissions of .nwclient MUST be 600, for security reasons.
OPTIONS
pattern
pattern is used to list only selected queues. You can use wildcards in the pattern, but you have to be careful to prevent shell inter-
pretation of wildcards like '*'.
-h
-h is used to print out a short help text.
-S server
server is the name of the server you want to use.
-U user name
If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your
NetWare user name.
-P password
You may want to give the password required by the server on the command line. You should be careful about using passwords in scripts.
-n
-n should be given to mount shares which do not require a password to log in.
If neither -n nor -P are given, pqlist prompts for a password.
-C
By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off
this conversion by -C.
SEE ALSO
nwclient(5), nprint(1), slist(1), ncpmount(8), ncpumount(8)
CREDITS
pqlist was written by Volker Lendecke (lendecke@math.uni-goettingen.de)
pqlist 01/10/1996 PQLIST(1)