Sponsored Content
Top Forums Programming Storing the output of a Unix cmd in my C program Post 302436624 by shamrock on Monday 12th of July 2010 03:54:41 PM
Old 07-12-2010
Use popen...it will give you a pointer to the output of date which can then be manipulated.
 

10 More Discussions You Might Find Interesting

1. Programming

storing date into a file from a program

hi all: i want to store the current date in to a file from a program. every time i execute the prg the date should get appended into the file. help me plz (2 Replies)
Discussion started by: bankpro
2 Replies

2. Shell Programming and Scripting

storing output of awk in variable

HI I am trying to store the output of this awk command awk -F, {(if NR==2) print $1} test.sr in a variable when I am trying v= awk -F, {(if NR==2) print $1} test.sr $v = awk -F, {(if NR==2) print $1} test.sr but its not working out . Any suggestions Thanks Arif (3 Replies)
Discussion started by: mab_arif16
3 Replies

3. UNIX for Dummies Questions & Answers

Storing the output into a variable

Hi unix gurus, I am trying to store the result of a command into a variable. But it is not getting stored. x='hello' y=echo $x | wc -c but it is giving the output as 0(zero) Pls help me its very urgent (7 Replies)
Discussion started by: ravi raj kumar
7 Replies

4. Shell Programming and Scripting

Storing awk output into variables

Hi all, Currently, i have a log file seperated by 'tab' and each record starting with a new line. i managed to retrieve the column that i'm interested in. (source_ip_address: xxx.xxx.xxx.xxx). example of awk output: '{ print $43 }' assuming the field is at column 43. 10.10.10.10... (4 Replies)
Discussion started by: faelric
4 Replies

5. Shell Programming and Scripting

Problem with `cat` the compiled output of C program in unix

Hello All, I have coded a C program which looks something like below... (program name: test.c) #include<stdio.h> main() { int dist,dm,dcm; printf(" Enter the distance between 2 cities in KM : "); scanf("%d",&dist); dm=dist*1000; dcm=dist*10; printf("Distance between 2 cities in... (6 Replies)
Discussion started by: smarty86
6 Replies

6. Programming

popen hangs program during cmd execution

How can I get around this? when my program reaches the following popen job it halts the program until the ping/netstat/ipconfig/traceroute is completed then resume to the rest of the program... FILE *in; extern FILE *popen(); char buff; char newline; char nstat; char nping; ... (5 Replies)
Discussion started by: Jess83
5 Replies

7. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

8. Shell Programming and Scripting

Storing or Using Numeric Output From a Function

Hi all, I'm trying to implement a linear congruential pseudorandom number generator (<http://en.wikipedia.org/wiki/Linear_congruential_generator>), since $RANDOM and /dev/random aren't standardized. I'm referring to the Shell & Utilities volume of POSIX.1-2008, but I'm running into some odd... (3 Replies)
Discussion started by: PehJota
3 Replies

9. Shell Programming and Scripting

Storing output into a variable

My script below seems to be choking because I need the the output of the find command to be stored as a variable that can then be called by used lower in the script. #!/bin/bash cd "/resumes_to_be_completed" var1=find . -mmin -1 -type f \( -name "*.doc" -o -name "*.docx" \)... (1 Reply)
Discussion started by: binary-ninja
1 Replies

10. Shell Programming and Scripting

Storing command output in an array

Hi, I want keep/save one command's output in an array and later want to iterate over the array one by one for some processing. instead of doing like below- for str in `cat /etc/passwd | awk -F: '$3 >100 {print $1}' | uniq` want to store- my_array = `cat /etc/passwd | awk -F: '$3 >100 {print... (4 Replies)
Discussion started by: sanzee007
4 Replies
GFTYPE(1)                                                     General Commands Manual                                                    GFTYPE(1)

NAME
gftype - translate a generic font file for humans to read SYNOPSIS
gftype [-i] [-m] gf_file_name [output_file_name] DESCRIPTION
This manual page is not meant to be exhaustive. The complete documentation for this version of TeX can be found in the info file or manual Web2C: A TeX implementation. The gftype program translates a gf (generic font) file output by, for example, mf(1), to a file that humans can read. It also serves as a gf file-validating program (i.e., if gftype can read it, it's correct) and as an example of a gf-reading program for other software that wants to read gf files. The gf_file_name on the command line must be complete. Because the resolution is part of the extension, it would not make sense to append a default extension as is done with TeX or DVI-reading software. If no output_file_name is specified, the output goes to stdout. OPTIONS
The output file includes bitmap images of the characters, if -i is given on the command line, and a symbolic listing of the gf commands, if -m is specified. ENVIRONMENT
gftype looks for gf_file_name using the environment variable GFFONTS. If that is not set, it uses the variable TEXFONTS. If that is not set, it uses the system default. SEE ALSO
dvitype(1), pktype(1). Donald E. Knuth et al., Metafontware. AUTHORS
David Fuchs and Don Knuth wrote the program. It was published as part of the Metafontware technical report, available from the TeX Users Group. Paul Richards originally ported it to Unix. Web2C 2012 14 December 1993 GFTYPE(1)
All times are GMT -4. The time now is 06:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy