🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #357

Re: Jak to zrobic????

#357
From: Krzysztof Murkowski
Date: Mon, 24 Nov 1997 13:43
16 lines
1098 bytes
Tomasz Grabowski wrote:
> 
> Mam jakis ciag znakow  *argvc[]  - niech to bedzie np. nazwa pliku
> "plik.txt". Teraz chcialbym (pod Unixem) aby moj program odpalil np.
> program "vi" wraz z ta nazwa "plik.txt". Ktos wie jak to sie robi???

#include <stdlib.h>
...
char string[100];
...
system( strcat(strcpy( string, "/usr/bin/vi "), argvc[0] ) );

-- 
Krzysztof Murkowski
mailto:murek@ml.put.poznan.pl
http://www.ml.put.poznan.pl/~murek
Technical Details
Message-ID: <34798497.2D22@ml.put.poznan.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!ict.pwr.wroc.pl!pwr.wroc.pl!math.amu.edu.pl!not-for-mail
References: <34797dd1.0@zeus.man.szczecin.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!ict.pwr.wroc.pl!pwr.wroc.pl!math.amu.edu.pl!not-for-mail
From: Krzysztof Murkowski <murek@ml.put.poznan.pl>
Newsgroups: pl.comp.lang.c
Subject: Re: Jak to zrobic????
Date: Mon, 24 Nov 1997 14:43:51 +0100
Organization: Politechnika Poznanska
Lines: 16
Message-ID: <34798497.2D22@ml.put.poznan.pl>
References: <34797dd1.0@zeus.man.szczecin.pl>
NNTP-Posting-Host: mlsun2.ml.put.poznan.pl
Mime-Version: 1.0
X-Mailer: Mozilla 3.0Gold (X11; I; SunOS 5.5.1 sun4m)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit