Hi!
I'm writing a C program which gets from the command line a shell command (such as "ls" ) and I should execute it.
My Q is: how can I send a command to the shell?
I know I have to use one of the above functions, but I don't know how to use them.
Thanks
eyal (1 Reply)
Hi,
Is it possible to run a program from my C program using only the full pathname?
for example if I wanna call: "ls", so I whould have to use:
execl("/bin/ls", "ls", NULL);
Is it possible to do this using only:
"/bin/ls"
thanks (1 Reply)
Consider the following scenario
program1:
main()
{
......
execl("path","function",...);
.....
}
function()
{
-----
-------
}
Now i want to include the path of function in execl. How to do this.
should the path be the path of function's executable file. If it so how... (1 Reply)
I want to make simultanous sh commands in an exec command
for example I want to counts the lines in a file
wc -l my file.txt | awk -F" " '{print $1}'` works fine in sh but I want to implement it in a c code
the first part works like this
execl("/usr/bin/wc", "wc", "-l", "myfile.txt",... (1 Reply)
Hi,
we would appreciate if any one answer the below query.
void main()
{
printf(“ I am in main\n”);
execl(“/HOME/source/file2”,” /HOME/source/file2”,1,0);
printf(“after execl\n”);
}
How to step the file2 source code in GDB. (2 Replies)
hello everybody
how can i time the execution of execl() command inside my C code?
for example, i wrote..
execl("md5sum","md5sum","myprog",NULL);
i want to count the duration of the execl command!
thanx in advance! (2 Replies)
how to use find command in execl function,
I used:
execl("/usr/bin/find","find","~","-name","filename.c",0); but it shows
find: ~ no file and directory i need to get the path of the file from the home .:wall: (2 Replies)
when execl fails using the command lss, it doesnt go into the next line
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
perror("execl failed"); exit(127);
for some reason the child process just stops and also the parent process also stops
so the line after the line that... (3 Replies)
Hi, I have two programs, one is named "Master" and the other one "slave". What I want to do is , when I execute Master, inside slave will be called by excecl, do some calculations, and send those to the master program... A little example of what I am failing to do:
if ((PID1=fork())==0) { //... (6 Replies)
Discussion started by: lamachejo
6 Replies
LEARN ABOUT V7
ppmtosixel
ppmtosixel(1) General Commands Manual ppmtosixel(1)NAME
ppmtosixel - convert a portable pixmap into DEC sixel format
SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC
LJ250 color inkjet printer.
If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table
begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file.
OPTIONS -raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com-
pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni-
tude larger than a compressed file and prints much slower.
-margin
If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci-
fied, a 1.5 inch left margin will offset the image.
PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was
greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the
color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation.
SEE ALSO ppm(5)AUTHOR
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)