Bc: File is unavailable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bc: File is unavailable
# 1  
Old 04-22-2012
Bc: File is unavailable

Hello, Unix-Forum!

Yet another problem:

Code:
var=1.5
bc $var + 3.2

results in

Code:
File 1.5 is unavailable

So I must be doing something wrong but I don't know what.

intelinside
# 2  
Old 04-22-2012
The message tells you that bc expects to read a file, but that "1.5" is not a file. Try:
Code:
echo "$var + 3.2" | bc

# 3  
Old 04-22-2012
Yes! Thank you!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Fork: Resource temporarily unavailable

Hi friends, Working on a linux X86-64 bit system, I suddenly started getting this error (mentioned in subject) from various scripts. I googled, found that there are couple of reason which causes this issue. - less memory I am pretty sure, memory seems to be stable on my system and at the... (15 Replies)
Discussion started by: clx
15 Replies

2. UNIX for Dummies Questions & Answers

Fork: Resource Temporarily Unavailable

I wrote a script that works most of the time but gave me fork: resource temporarily unavailable some of the time. I restarted my computer and now it runs fine but googling "fork: resource temporarily unavailable" and looking on the forums has not actually helped me figure out what exactly I... (3 Replies)
Discussion started by: monstrousturtle
3 Replies

3. UNIX for Advanced & Expert Users

fork: Resource temporarily unavailable , server unexpectedly unavailable network connection

Solaris 10 Server refuse to connect :wall: fork: Resource temporarily unavailable , server unexpectedly unavailable network connection , refuse error, disconnect message, fatal error type2, (protocol error type2) Issue has been resolved after taken few steps :b: First of all need to check... (1 Reply)
Discussion started by: taherahmed
1 Replies

4. Shell Programming and Scripting

delete unavailable soft link

Hi guys, Good day to all. I have a question that how to remove all unavialable soft link in one folder? Because I moved orginal (source) folder and the soft links which I created have been not available at all. And then how do I remove the soft links in one time? Any idea? Thanks &... (3 Replies)
Discussion started by: heefan
3 Replies

5. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

6. BSD

Network unavailable after start up

There is a FreeBSD machine which normally has a network connection, but after a recent start up no longer has such a connection. All other computers on the same router do have an active network. Where do I start looking to troubleshoot this? Thanks in advance (2 Replies)
Discussion started by: figaro
2 Replies

7. UNIX for Advanced & Expert Users

Fork:resource unavailable

Hello. I have code which create processes with fork(). I set a limit for processes by typing ulimit -u 20. Then I run my code who should create 100 processes. Unfortunately, I have a mistake there and I forgot to quit all of my forked processes when fork gave me return value -1. So I am trapped in... (5 Replies)
Discussion started by: samos
5 Replies

8. Solaris

Unix file temporarily unavailable

Morning, I logged on to my webserver today and checked /var/adm/messages. I just happen to run across this message: Sep 3 13:15:21 web1 nfs: file temporarily unavailable on the ser ver, retrying... Is there a problem with nfs? Are the files locked? (9 Replies)
Discussion started by: dr. phreeze
9 Replies

9. Programming

How to recognize that the server is currently unavailable?

hi all How to recognize that the server is currently unavailable? by programatically.give some example. am using fedora5 AMD cheers (2 Replies)
Discussion started by: munna_dude
2 Replies

10. Solaris

Device PS1 AC UNAVAILABLE

Hi im getting this error on my solaris server. sscprvmds001 picld: Device PS1 AC UNAVAILABLE Does anyone know what this means (1 Reply)
Discussion started by: dennisca
1 Replies
Login or Register to Ask a Question