How to use two different libraries?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to use two different libraries?
# 1  
Old 07-13-2009
How to use two different libraries?

Hello,

I need to use two different libraries like /usr/local/bin/expect and /usr/bin/ksh at the same script. Is it possible?
# 2  
Old 07-13-2009
Yes, what I do is use a ksh script as normal (#!/bin/ksh at the top) and when I want to use expect I put the expect code in a separate scriptname.exp file (with #!/usr/local/bin/expect -f at the top, changing the location to suit) and call scriptname.exp from within the ksh script. So not quite using ksh(1) and expect(1) in the same script but I hope this is what you were trying to acheive?
# 3  
Old 07-14-2009
Thanks a lot can i do the opposite. I mean can i first execute expect script then call ksh script. Actually i could not find a way that execute ksh script or another program in expect script.

---------- Post updated at 12:56 AM ---------- Previous update was at 12:27 AM ----------

Thanks a lot ı found the way.
Code:
send "./filename\r"

it works Smilie
# 4  
Old 07-20-2009
Have you tried:
Code:
spawn ./filename

?
# 5  
Old 07-21-2009
yeah, i have tried that. it works also.

---------- Post updated at 02:07 AM ---------- Previous update was at 12:55 AM ----------

but there is a problem with spawn. whether the previous command or job is done or not , spawn command starts working. Not wait for previous command is finished
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

PATH for c libraries

Hello, I met a problem when running a java program. When I did the debugging: srna/ExeFiles/linux$ ldd patman linux-gate.so.1 => (0xf77b5000) libpopt.so.0 => not found libstdc++.so.6 => not found libm.so.6 => /lib32/libm.so.6 (0xf7778000) libgcc_s.so.1 => not found ... (5 Replies)
Discussion started by: yifangt
5 Replies

2. Solaris

odbc libraries

Hi, this is my first experience with Solaris. For work, I must configured an applicacion (oracle EPM, this include Datadirect odbc drivers) in solaris. Additionally, we must connect to Sybase IQ Database (I installed odbc drivers to do this). The problem is, I can't get those two odbc... (1 Reply)
Discussion started by: dmedinacl
1 Replies

3. Programming

I want to know some c libraries

I'm a rookie to C and i'm looking for some libraries to learn,something likes the C++ STL or Boost ,does any1 can tell me some of them?Thanks a lot:) Eric (3 Replies)
Discussion started by: homeboy
3 Replies

4. UNIX for Dummies Questions & Answers

libraries

I am slowly ploughing my way through the list of links to on-line tutorials you provided to newbies. I for one am grateful for such a comprehensive list, so first of all thank you for that. What i cannot seem to find, is information on C++ libraries: The two links on libraries in your list... (0 Replies)
Discussion started by: pil888
0 Replies

5. HP-UX

v2 standard libraries

I am a bit confused about the use of _v2 standard libraries on HP. I am working on HP11.11 risk machine and HP 11.23 Itanium machine. I am building a C++ shared library which is linked by a JNI shared library and other non-java related libraries. Eveything is compiled with -AA flag. When I... (0 Replies)
Discussion started by: cactuar
0 Replies

6. Linux

Where to get X window Libraries?

Hey, I'm trying to install fluxbox. Currently i'm running Mandrake 10.1 with KDE. When i ./configure fluxbox it returns an error saying configure: error: Fluxbox requires the X Window System libraries and headers. Where do i download the X window System libraries and headers from? I... (3 Replies)
Discussion started by: byblyk
3 Replies

7. Linux

Shared Libraries

How do i make a library shared say i have a library a.so which i have just compiled. I want to make it shared how do i make it Next Queation is what is the difference between a.so.0 a.so.1 a.so.2 & a.so :rolleyes: (1 Reply)
Discussion started by: wojtyla
1 Replies

8. IP Networking

Libraries

How is Libnet and libpcap are useful in sending a packet through DLL layer and sniff network layer? and how sinffers are used to track ip adresses provided Mac adresses? (1 Reply)
Discussion started by: netsavy
1 Replies

9. Programming

libraries missing in C

some libraries are missing like conio.h and syslib.h how can i have them installed ? (4 Replies)
Discussion started by: C|[anti-trust]
4 Replies

10. Programming

C Libraries??

I can not locate package sys/mkdev.h on HP-UX or Linux. Is it a special package or something? (9 Replies)
Discussion started by: laila63
9 Replies
Login or Register to Ask a Question