Programming :: Runtime C From Bash Programing ?

Jan 8, 2010

I am in the process of learning bash programming,i have a any problem,about call my own C language functions directly or runtime from bash shell?

example :

each functionCalltobash1 and functionCalltobash2 have many other function inside themself.

Is bash shell support invoked my C function?

View 2 Replies


ADVERTISEMENT

Red Hat / Fedora :: Runtime C From Bash Programing?

Jan 8, 2010

i am in the process of learning bash programming,i have a any problem,about call my own C language functions directly or runtime from bash shell?

[Code]...

View 1 Replies View Related

General :: Bash Script: Find, Grep If And Else Programing?

Oct 20, 2010

I am bussy with a litle bash script but i have now a problem.I have a file on the server with every time different text.Somewere in this text the is the following line:PHP Code:<BR><DIV CLASS='itemTotalsTitle'>2 Matching Service Entries Displayed</DIV> I want to make a bash script that replace this line when it says:"0 Matching Service Entries Displayed"To a other text like:"There a no knowing problem(s) on this moment."]If there is a other number than "0" than replace this line with:2 problems have been found on this moment, whe are bussy to fix this problem

View 3 Replies View Related

Programming :: Gfortran V4.4.1 Run In Machine Gives Runtime Error?

Sep 10, 2010

I am new to both linux and fortran programming. I am trying to read from an external file, but it gives this error message: Fortran runtime error: Bad integer for item 1 in list input Part of the code that has the problem is:

open(unit=3,file=&
atrain_data/prfdata/temp_pres_cld_profile_for_CRTM2006-06-15T200163.dat',FORM='formatted')
read(3,*)bsepos
read(3,*)toppos
write(3,*)bsepos
write(3,*)toppos

[Code]...

All the variables have been declared before and there is no problem with that. The problem (error message) is in the (first) line that deals with open(unit=3,file='..//').

View 2 Replies View Related

General :: Matlab 7.5 Compiled Runtime Installation: Getting A "No Java Runtime Environment Was Found On This System"?

Oct 15, 2010

I am trying to install the Matlab 7.5 compiled runtime for 64-bit Linux (MCRInstaller.75.glnxa64.bin) and keep getting a "No Java Runtime Environment(JRE) was found on this system." error message.

I understand the JRE is bundled with MCRInstaller and will self-compile/install. However, I don't have admin access, could this be the source of the problem? If so, how could I fix it (not sure how to direct it to install locally without going into the source code)?

I got around this error before, but stupid me didn't write down what I did and I forgot.

View 3 Replies View Related

Programming :: Calling System Calls In C Runtime (in The Run-time)?

Sep 23, 2010

I know there is a way to call winapi in runtime in windows. I want to ask how can I call a system call in gcc in runtime (when I don't know what it can be)? I don't mean syscall that I think is for calling only system calls and not library functions.

View 4 Replies View Related

Programming :: How To Change - Add To - Library Search Path At Runtime

Jan 9, 2011

I'm writing an application with a plugin architecture and would like modify (specifically add to) the dynamic library search path while the main executable is running.

The plugin paths are not known until the application is running so I can't set LD_LIBRARY_PATH ahead of time.

My understanding (although I haven't tested it) is that the executable will only parse the LD_LIBRARY_PATH once, early on, so modifying this environment variable at runtime will have no effect.

(Note - on Windows the solution is to modify the PATH environment variable)

I know it's possible to specify the full path to load a dynamic library, and this would work if the plugin(s) only had a single library to load, but some of them will have a bunch of libraries with their own inter-dependencies, so I'd like the plugin folder(s) to get added to the search path to pick up the dependant libs.

View 8 Replies View Related

Programming :: Trace The Method Calls In Java During Runtime?

May 12, 2009

how can I trace the method calls in Java during runtime?

View 1 Replies View Related

Programming :: Fortran Runtime Error: Bad Value During Floating Point Read

Jun 28, 2011

I am getting error Fortran runtime error: Bad value during floating point read. How do I format negative sign?

[code]...

View 1 Replies View Related

Programming :: Using Java Runtime - Program Which Simply Calculates The Load Average Of A Process

Feb 10, 2011

I'm new to the linux world and its been quit sometime since i've done any programming. However, I'm writing a program which simply calculates the load average of a process. In doing this I need to use the uptime command for linux in a java program. I've done a little bit of searching on the net and it mentions this is possiable by using java runtime command. Unfortunatly though I have yet to find a working example of this. I've tried just simply reading the /proc/uptime file but I have no clue how to format the 2 numbers in seconds to make it the same as if you just typed in uptime in the linux command prompt.

View 2 Replies View Related

Fedora Installation :: Cannot Find Anaconda-runtime In /usr/lib/anaconda-runtime

Feb 16, 2011

After installing Fedora 14 and being satisfied with the behaviour and the packages installed for it, i want to replicate the same installation in a few more PCs, so i installed Revisor to make with it an iso file that reflects my actual installation.

The problem is that if i run the software from Applications->System tools->Revisor, nothing happens after giving the user password.

Then i run it from a consele and this error is produced after giving my password: "Cannot find anaconda-runtime in /usr/lib/anaconda-runtime"

But anaconda is the environment used for installation, so it is installed from the very begining. Why this happens?

View 1 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 Replies View Related

Programming :: Bash: Get Filename And Extension Using Bash?

Jan 9, 2010

I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:

Let FILE="thefilenameofsomefilesfor_instance.txt"

Code:

NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`

I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.

View 5 Replies View Related

Programming :: Programing - Reading File Line By Line Then Char By Char In Each Line

May 29, 2010

I've never programed shell scripting.

Code goes like so:

I simply want to read a file "data.txt" line by line Then char by char and add them into a result var. The file is supossed to always contain numeric values

View 8 Replies View Related

Ubuntu :: Socket Programing Using TCP?

May 6, 2010

I need a code for a multi client and server

where a client need to login to server after a connection has been established if login is not sucessfull connection should be terminated I need it in c language

server asks client name and password if authenticated , a connection is established . and if client is new can also register its name

I have done it using files but its not working when asks for user name it searches a file with that username if a file is found and password with same as username it opens the username file check for the string if it matches with the string login is ok

View 1 Replies View Related

Fedora Installation :: Can't Do Programing On F11 / Resolve This?

Sep 4, 2009

I installed Fedora 11, but i can't do programing
teh fedora seems not to include anything IDE for free like previous version

I can not search on installed desktop what software were included
it asks me to connect to the Internet to view the installers and install new things
I'd also like to compile latex to have a Qt IDE installed but none are there for me

View 8 Replies View Related

General :: Difference Between Shell And C Programing?

Jul 20, 2011

Difference between shell and c programing

View 4 Replies View Related

General :: Created On Making C Programing Lang?

Feb 11, 2011

problem created on making c programing lang.

View 1 Replies View Related

General :: Good Forums About System Programing?

Jan 9, 2011

Does somebody recommend some good forums about linux programing?

View 6 Replies View Related

General :: Case Statement In Shel Programing?

Mar 15, 2010

I am facing problem with the following script. Could you please look into this.echo 'Enter Staging number' case $STGNUM in

1)
for i in {'stg1-greg','stg1-marsha','stg1-peter','stg1-jan','stg2-greg','stg2-marsha','stg2-peter','stg2-jan'};do echo $i; ssh $i sudo -u dev /opt/usr/apps/workflow/stopwf.sh;done;

[code]....

View 2 Replies View Related

Ubuntu Multimedia :: What I Get Is A Text File In Some Programing Language

Feb 7, 2010

The first is Mp3 which is no problem for Ubuntu. The second is WMP, also no problem. The third format is WMA, which uses an Overdrive Media Console designed to run in Windows. This has stumped me. I was hoping to run it in Wine, but the media console refuses to download into Ubuntu. Then I tried downloading the audio file straight into Ubuntu. What I get is a text file in some programing language, parts of which are in readable english describing the book and lines of code refering actual audio files(HTML tags?).So Can anybody tell me how to play WMA audio books in Ubuntu. The rest of the media is installed and works perfectly.

View 1 Replies View Related

Ubuntu :: Programing Errors When Trying To Install / Remove Apps

Aug 10, 2011

I was messing around trying to be able to download minecraft to my computer (it's very confusing for Linux, and I know nothing about this system!) Now when I try to install apps in the Software Center I get this error:
There seems to be a programming error in aptdaemon, the software that allows you to install/remove software and to perform other package management related tasks.

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 961, in simulate
trans.unauthenticated = self._simulate_helper(trans)
File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 1085, in _simulate_helper
return depends, self._cache.required_download,
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 226, in required_download
pm.get_archives(fetcher, self._list, self._records)
SystemError: E:I wasn't able to locate file for the sun-java6-jre package. This might mean you need to manually fix this package.

I've seen a solution that seemed to work for someone else but when I go into the Terminal and type in the commands it asks for my sudo password and I have no idea what that means/is because I never set any kind of password like that.

View 6 Replies View Related

Programming :: Bash Programming - Rename Files In A Loop?

Mar 31, 2011

I need to rename the resulted searched files from a loopI have the following code:

find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done

basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell

View 10 Replies View Related

General :: Udp Tcp Command Line Tool For Shell Script Programing

Feb 8, 2011

I am looking for a powerful command line tool to send and receive data via socket I mean define IP , port and data other options for command to send and receive data from sender.(like a high level socket programming)

View 4 Replies View Related

Programming :: Write A Bash Script That Sources Another Bash Script?

Jan 29, 2011

I am trying to write a bash script that sources another bash script. Essentially, I need a few lines to check to see if a certain variable is set. If not, I set it manually, and then source a scripts with that variable in the path. I wrote a test script to try it, but for some reason the last line does not work. Here is what I wrote:

#!/bin/sh
source ~setupdir/setup.shrc #just a test, this line works
echo ${#SETUP} # prints 0 if setup is not set, which it isn't
if [ ${#SETUP} -eq 0 ]
then
SETUP="~setupdir"
fi
echo $SETUP # prints ~setupdir

[Code]...

View 5 Replies View Related

Programming :: Bash Scripting To Programming?

Jul 13, 2011

i'm in the process of learing C++. currently i'm creating shell scripts to get things done. i'm just curious how, as a programmer using C++ you would get a similar job done.as an example i have a script that takes the contents of files, pipes it to some sed and awk commands, which is piped to create a new file. that file is then imported into a mysql database.if you were going to do this in C++, would you call the sed/awk programs to modify the file, or can it be done within the program itself? i'm probably jumping the gun here because i've just started learing about pointers so this is above my ability

View 12 Replies View Related

Programming :: Sed A Variable In Bash?

Mar 25, 2011

I have beat this enough and don't get what should have been a very simple thing to do. I build a variable;

Code:
CLIST=java,lua,python,php,perl,ruby,tcl
CLIST will be used by another bash script but I need to replace the commas with a space. I

[code]...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved