getting input, then outputting it


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers getting input, then outputting it
# 1  
Old 06-26-2008
Question getting input, then outputting it

Hi!

I am a newbie to Unix. I was writing a little game program for fun when thought of an idea to allow data to be saved. I knew to take all of the Predefined variables and put them into a separate file, then including the file in the program. But I am having trouble making it so that the user can tell it to save the data and it would write the data to the page holding the Predefined variables. I am using PHP in my program.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Outputting colours in HP-UX scripts

Hi all, This is my first ever posting, so please be gentle with me :) I'm trying to write a script in HP-UX which outputs text in different colours, but although I can get the script to output different colours to the screen, I can't get it to write different colours to a file. Take the... (4 Replies)
Discussion started by: neilharvey
4 Replies

2. Shell Programming and Scripting

awk not outputting properly

Hi Everyone, Long time lurker here. I have a project of bringing every one of our data centers to a newly enforced company standard. Standard naming conventions, domain migrations, etc. So, the people who are setting the standards are providing me with a CSV file. Column 1 has the old... (23 Replies)
Discussion started by: Zaphod_B
23 Replies

3. UNIX for Dummies Questions & Answers

outputting set -x to file

I need to enable set -x in my croned script as at times the script is not returning all data that it should be. This only happens intermittently and as such I would like a means of being able to check what goes wrong. My question is how to output the debug of set -x to file? (1 Reply)
Discussion started by: rob171171
1 Replies

4. Shell Programming and Scripting

Problem outputting increment

With this script the output to the terminal does not increment. Can anyone tell me what I need to do to get this to increment output to the terminal? Here is the output mpath major,minor number ls: /dev/mapper/mpathp1: No such file or directory raw device output 253,44 echo raw device... (5 Replies)
Discussion started by: bash_in_my_head
5 Replies

5. Homework & Coursework Questions

Outputting variables on a line

Stuck on formatting an output. I want to list 6-99 on the screen, looking something like this: 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 and so on down to 6. So far I am only able to print one value per line. This is what I have I have defined x as integer x=99... (2 Replies)
Discussion started by: huckknows
2 Replies

6. Shell Programming and Scripting

Outputting to table

I have information in a file called HITS. This file has been populated by the user entering search criteria. the HITS file contains information: filname.hits: 123.33.345.66 Fri Nov 26 11.45.56.43 GMT 2006 at the moment i am just displayin the information using cat HITS. ... (3 Replies)
Discussion started by: amatuer_lee_3
3 Replies

7. Shell Programming and Scripting

grep: outputting search strings

Newbie question -- any help very much appreciated: I want to be able to get grep (or whatever else would work) to return not only matching lines, but also the original input string: An example may help: Suppose I have two files data1.txt and data2.txt: data1.txt Hello my name is foo. What... (3 Replies)
Discussion started by: tapmas
3 Replies

8. Shell Programming and Scripting

Help in outputting the result in log files

This is the file am having: "40","1G1AL55 ",30482,9000 "40","1G1ZT58 ",29098,10600 "40","1G1AL15 ",29222,9400 "46","1G6KD57 ",3083,28400 "46","1G6KD57 ",27909,25200 "49","1G1ZU57 ",16391,13900 "49","1G2ZG58 ",28856,12400 I want to display the output in three files... (23 Replies)
Discussion started by: dave_nithis
23 Replies

9. Shell Programming and Scripting

Outputting from two input files.

Ok, lets suppose I have two files like so: file1 John 5441223 Sandy 113446 Jill 489799 file2 Sandy Tuesday Jill Friday John Monday Is it possible to match records from these two files and output them into one output file? For example, lets suppose I want to output like this: ... (5 Replies)
Discussion started by: Liguidsoul
5 Replies

10. Shell Programming and Scripting

sed not outputting last line of input file

I am using sed for a simple substitution (see command syntax below). Everything works fine except that the last line of the input file does not get written to the output file. Has anyone ever seen this and know of way to force the last line to be written? I don't know if it's playing a part in... (3 Replies)
Discussion started by: 2reperry
3 Replies
Login or Register to Ask a Question
funimageput(3)							SAORD Documentation						    funimageput(3)

NAME
FunImagePut - put an image to a Funtools file SYNOPSIS
#include <funtools.h> int FunImagePut(Fun fun, void *buf, int dim1, int dim2, int bitpix, char *plist) DESCRIPTION
The FunImagePut() routine outputs an image array to a FITS file. The image is written either as a primary header/data unit or as an image extension, depending on whether other data have already been written to the file. That is, if the current file position is at the begin- ning of the file, a primary HDU is written. Otherwise, an image extension is written. The first argument is the Funtools handle returned by FunOpen(). The second buf argument is a pointer to a data buffer to write. The dim1and dim2 arguments that follow specify the dimensions of the image, where dim1 corresponds to naxis1 and dim2 corresponds to naxis2. The bitpix argument specifies the data type of the image and can have the following FITS-standard values: o 8 unsigned char o 16 short o 32 int o -32 float o -64 double When FunTableRowPut() is first called for a given image, Funtools checks to see if the primary header has already been written (by having previously written an image or a binary table.) If not, this image is written to the primary HDU. Otherwise, it is written to an image extension. Thus, a simple program to generate a FITS image might look like this: int i; int dim1=512, dim2=512; double *dbuf; Fun fun; dbuf = malloc(dim1*dim2*sizeof(double)); /* open the output FITS image, preparing to copy input params */ if( !(fun = FunOpen(argv[1], "w", NULL)) ) gerror(stderr, "could not FunOpen output file: %s ", argv[1]); for(i=0; i<(dim1*dim2); i++){ ... fill dbuf ... } /* put the image (header will be generated automatically */ if( !FunImagePut(fun, buf, dim1, dim2, -64, NULL) ) gerror(stderr, "could not FunImagePut: %s ", argv[1]); FunClose(fun); free(dbuf); In addition, if a Funtools reference handle was specified when this table was opened, the parameters from this Funtools reference handle are merged into the new image header. Furthermore, if a reference image was specified during FunOpen(), the values of dim1, dim2, and bit- pix in the calling sequence can all be set to 0. In this case, default values are taken from the reference image section. This is useful if you are reading an image section in its native data format, processing it, and then writing that section to a new FITS file. See the imblank example code. The data are assumed to be in the native machine format and will automatically be swapped to FITS big-endian format if necessary. This behavior can be over-ridden with the convert=[true|false] keyword in the plist param list string. When you are finished writing the image, you should call FunFlush() to write out the FITS image padding. However, this is not necessary if you subsequently call FunClose() without doing any other I/O to the FITS file. SEE ALSO
See funtools(7) for a list of Funtools help pages version 1.4.2 January 2, 2008 funimageput(3)