Thread View: comp.unix.shell
2 messages
2 total messages
Started by Rudrakshala Purushotham
Fri, 16 Nov 1990 10:19
% /bin/sh -c /bin/ls -l -R ???
Author: Rudrakshala Purushotham
Date: Fri, 16 Nov 1990 10:19
Date: Fri, 16 Nov 1990 10:19
19 lines
1065 bytes
1065 bytes
I want run the command in subject from c-shell prompt. The problem is it goes through .login and runs /bin/ls only. I tried % /bin/sh -c "/bin/ls -l -R" it works as expected. What are the other ways of doing this. How does shell escape functions handle this in a C program using execv () ? Thanks for any help in advance. -- Purush -- R. Purushotham Email: rudrak@saphir.cl.bull.fr F7 1 D5 BULL SA Tel Off: 34627000 ext 3928 78340 Les Clayes sous Bois FRANCE Tel Res: 34604752 =======================================================================
Re: % /bin/sh -c /bin/ls -l -R ???
Author: Andy Crump
Date: Thu, 29 Nov 1990 15:51
Date: Thu, 29 Nov 1990 15:51
30 lines
1690 bytes
1690 bytes
>>>>> On 16 Nov 90 10:19:00 GMT, rudrak@saphir.cl.bull.fr (Rudrakshala Purushotham) said:
Rudrakshala> Originator: rudrak@saphir
Rudrakshala> I want run the command in subject from c-shell prompt. The problem is
Rudrakshala> it goes through .login and runs /bin/ls only.
Rudrakshala> I tried
Rudrakshala> % /bin/sh -c "/bin/ls -l -R"
I don't believe .profile is invoked when /bin/sh -c is used. Only at
login if argv[0] is "-sh". I tried this under csh on Sun OS, and
Intel System V Release 4 version 2.0 and had no problem getting it to
recognize the -l -R options.
Rudrakshala> it works as expected. What are the other ways of doing this. How does
Rudrakshala> shell escape functions handle this in a C program using execv () ?
The C program can call system(), which essentially does the same thing
or if using execv(), they will build up the argv vector and pass it to
execv().
--
-- Andy Crump
...!tektronix!reed!littlei!andyc | andyc@littlei.intel.com
...!uunet!littlei!andyc | andyc@littlei.uu.net
Disclaimer: Any opinions expressed here are my own and
not representive of Intel Corportation.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads