Bash Shell Scripts

This is a discussion on Bash Shell Scripts within the C Programming forums, part of the General Programming Boards category; Hi Im needing to write a Bash shell script which will transfer a .PDB filename to a C program which ...

  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, 07:20 AM
  2. redirect C output to shell (bash) input
    By deltaxfx in forum C Programming
    Replies: 7
    Last Post: 08-24-2005, 01:55 PM
  3. What shell is more powerful?
    By xddxogm3 in forum Tech Board
    Replies: 10
    Last Post: 07-24-2004, 10:47 PM
  4. shell scripts?
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 05-06-2002, 05:43 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21