Thread: Bash Shell Scripts

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    3

    Bash Shell Scripts

    Hi

    Im needing to write a Bash shell script which will transfer a .PDB filename to a C program which will then be doing things to that file.

    Anyone any ideas where to start would be appreciated!!!

  2. #2
    Registered User
    Join Date
    Aug 2002
    Posts
    351
    if i've read your question correctly, you can call command-line programs in bash using back-ticks ````

    so write and compile you c code (that accepts the filename as a argument) and in bash go:

    Code:
    #!/bin/sh
    
    FILENAME=filename.pdb
    RESULT=`my_c_program $FILENAME`
    echo $RESULT
    do you think this should be on the linux programming board?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cygwin bash shell scripts are not executing.
    By indigo0086 in forum Tech Board
    Replies: 3
    Last Post: 08-01-2007, 08:20 AM
  2. redirect C output to shell (bash) input
    By deltaxfx in forum C Programming
    Replies: 7
    Last Post: 08-24-2005, 02:55 PM
  3. What shell is more powerful?
    By xddxogm3 in forum Tech Board
    Replies: 10
    Last Post: 07-24-2004, 11:47 PM
  4. shell scripts?
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 05-06-2002, 06:43 AM
Website Security Test