I can't get touch to simultaneously create three empty files file1, file2, file3. I tried:$ touch filebut all I got was one file:$ fileWhat did I do wrong? (4 Replies)
Hi All,
I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both.
The value of $? is coming 0 in if part also and else part too.
#!/bin/ksh
if ]; then
echo "data"
# exit 0
echo "$?"
else... (4 Replies)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
:confused:
Hi there
I have a requirement to create a variable block binary file on AIX.
Once the file has been feed with info , the file needs to be ftp to MVS.
The problem experienced; when transferring the file to MVS.
MVS does not pick up the carriage return line feed, which OA OD
... (0 Replies)
Hi,
I am trying to write an Archive script that should look for files older than x days, zip them and move the zip to the archive directory and delete the files that have been zipped. I am not sure how i can handle this error:
"cowardly refusing to create an empty archieve".
Just wanted to know... (9 Replies)
Hi,
i need a single command to create multiple empty files(no trailing lines as well) and empty the files if already existing.
please let me know or if this has been ansered, if some ocan share the link please, thanks
> newfile.txt
or
:> newfile.txt
do not work (4 Replies)
Hello Guys.
Please I would like to create empty files from a list
In file1 will be the followin values, so i will like to create for each name a empty file.
file1
2191off-r0.sps
2192off-r0.sps
2193off-r0.sps
2194off-r0.sps
2195off-r0.sps
So I need to get 5 empty files.
Thanks for... (7 Replies)
Hey i try to create empty text file with utf-8 encoding
without success
what is the right way to do this ?
tried with
touch test.txt
iconv -f UTF-8 -t UTF-8 test.txt
or
iconv -f latin1 -t UTF-8 test.txt (8 Replies)
Hi all,
Is Der any unix command which will create a empty dataset ..?(in .ds ).I know we can use orchadmin dump command to view dataset data.. but how to create a dataset..?
like
sampledataset.ds
thanks in advance
hemanthsaikumar (1 Reply)
Discussion started by: hemanthsaikumar
1 Replies
LEARN ABOUT SUSE
libmaketmpfile
Netpbm subroutine library: pm_make_tmpfile() function(3) Library Functions Manual Netpbm subroutine library: pm_make_tmpfile() function(3)NAME
pm_make_tmpfile() - create a temporary named file
SYNOPSIS
#include <netpbm/pm.h>
pm_make_tmpfile(FILE ** fileP,
const char ** filenameP);
EXAMPLE
This simple example creates a temporary file, writes 'hello world' to it, then writes some search patterns to it, then uses it as input to
grep:
#include <netpbm/pm.h>
FILE * myfileP;
const char * myfilename;
pm_make_tmpfile(&myfileP, &myfilename);
fprintf(myfile, '^account:s.*0);
fprintf(myfile, '^name:s.*0);
fclose(myFileP);
asprintfN(&grepCommand, 'grep --file='%s' /tmp/infile >/tmp/outfile');
system(grepCommand);
strfree(grepCommand);
unlink(myfilename);
strfree(myfilename);
DESCRIPTION
This library function is part of Netpbm(1)
pm_make_tmpfile() creates and opens a temporary file, returning to you a stream file handle for it and its name.
pm_make_tmpfile() chooses a file name that is not already in use, with proper interlocking to make sure that it actually creates a file and
opens the new file, as opposed to merely opening an existing file.
If you don't need to access the file by name, use pm_tmpfile() instead, because it's cleaner. With pm_tmpfile(), the operating system
always deletes the temporary file when your program exits, if the program failed to clean up after itself.
The temporary file goes in the directory named by the TMPFILE environment variable. If TMPFILE is not set or is set to something unusable
(e.g. too long), pm_tmpfile() falls back to the value of the standard C library symbol P_tmpdir (like the standard C library's tmpfile()).
The name of the file within that directory is like myprog_blrfx, where myprog is the name of your program (arg 0) and the rest is an arbi-
trary discriminator.
If pm_make_tmpfile() is unable to create a temporary file, it issues a message to Standard Error and aborts the program.
HISTORY
pm_tmpfile() was introduced in Netpbm 10.27 (March 2005).
netpbm documentation 10 November 2007 Netpbm subroutine library: pm_make_tmpfile() function(3)