actually what I've done so far is rather pathetic and it's not working
$1-first parameter, old extension
$2-second parameter, new extension
I don't know how to keep the name of copied files and just change the extension
Alright, basically we're in the whole where we can't tar/gzip a folder since its to big so how do I copy files to a new folder for example
I got files from a-Z, i want to copy all files which starts with a A or a into another folder heres file structure
./backups/A
./backups/B... (11 Replies)
I've been able to find all the extensionless files named photos using the command:
find /usr/local/apache/htdocs -name photos -print0
I need to copy those files to the name photos.php in their same directory.
I've found a bunch of xarg examples for moving to other directories but I wasn't... (7 Replies)
Hey All,
I want to get the access time of files in a directory.
I used ls -lu on a directory and picked a file that had the access time of Mar 1 and used cat to get the contents of the file. Then I used the ls -lu again and the access time changed on that file. Perfect !!
Now if I cat a... (10 Replies)
Hi all,
i have 2 directory of files, the first directory(ext1directory) contain files of extension .ext1 and the second directory(allextdirectory) contains files of multiple extensions (.ext1,.ext2,.ext3,..)
so i want to copy the files from directory 2(allextdirectory) that have the same name... (8 Replies)
Hi all...
I am trying to copy all my shell script to some directory using following command, I want to simplify it by not using awk..please some one help me....
find -name "*.sh" | awk -F"/" '{a=$NF;gsub(".sh",x,a);cmd="cp"" " $0" ""/home/akshay/MY_ALL/"a"_"++i".sh";system(cmd)}' (3 Replies)
Hello
How do i copy files matching multiple conditions. Requirement is to search files starting with name abc* and def* and created on a particular date or date range given by the user and copy it to the destination folder.
i tried with different commands.
below one will give the list ,... (5 Replies)
Hi All,
I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing.
1.I need to display the .done files from the directory.
2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory
... (2 Replies)
Hi,
I have multiple files that read:
Asa.txt
Bad.txt
Gnu.txt
And I want to rename them using awk to
Asa_ddmmyytt.txt and so on
...
If there is a single command or more efficient executable please share!
Thanks! (4 Replies)
Hello All,
Since i'm relatively new in shell script need your guidance.
I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder.
so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
The bash executes but returns no results and the set -xv showed while the $run variable in blue, was extracted correctly, the $match value in green, was not, rather both values in home/cmccabe/Desktop/f1 were extracted not just the matching.
There will always be an exact match from the $run to... (7 Replies)
Discussion started by: cmccabe
7 Replies
LEARN ABOUT SUSE
funflush
funflush(3) SAORD Documentation funflush(3)NAME
FunFlush - flush data to output file
SYNOPSIS
#include <funtools.h>
void FunFlush(Fun fun, char *plist)
DESCRIPTION
The FunFlush routine will flush data to a FITS output file. In particular, it can be called after all rows have been written (using the
FunTableRowPut() routine) in order to add the null padding that is required to complete a FITS block. It also should be called after com-
pletely writing an image using FunImagePut() or after writing the final row of an image using FunTableRowPut().
The plist (i.e., parameter list) argument is a string containing one or more comma-delimited keyword=value parameters. If the plist string
contains the parameter "copy=remainder" and the file was opened with a reference file, which, in turn, was opened for extension copying
(i.e. the input FunOpen() mode also was "c" or "C"), then FunFlush also will copy the remainder of the FITS extensions from the input ref-
erence file to the output file. This normally would be done only at the end of processing.
Note that FunFlush() is called with "copy=remainder" in the mode string by FunClose(). This means that if you close the output file before
the reference input file, it is not necessary to call FunFlush() explicitly, unless you are writing more than one extension. See the
evmerge example code. However, it is safe to call FunFlush() more than once without fear of re-writing either the padding or the copied
extensions.
In addition, if FunFlush() is called on an output file with the plist set to "copy=reference" and if the file was opened with a reference
file, the reference extension is written to the output file. This mechanism provides a simple way to copy input extensions to an output
file without processing the former. For example, in the code fragment below, an input extension is set to be the reference file for a
newly opened output extension. If that reference extension is not a binary table, it is written to the output file:
/* process each input extension in turn */
for(ext=0; ;ext++){
/* get new extension name */
sprintf(tbuf, "%s[%d]", argv[1], ext);
/* open input extension -- if we cannot open it, we are done */
if( !(ifun=FunOpen(tbuf, "r", NULL)) )
break;
/* make the new extension the reference handle for the output file */
FunInfoPut(ofun, FUN_IFUN, &ifun, 0);
/* if its not a binary table, just write it out */
if( !(s=FunParamGets(ifun, "XTENSION", 0, NULL, &got)) ||
strcmp(s, "BINTABLE")){
if( s ) free(s);
FunFlush(ofun, "copy=reference");
FunClose(ifun);
continue;
}
else{
/* process binary table */
....
}
}
SEE ALSO
See funtools(7) for a list of Funtools help pages
version 1.4.2 January 2, 2008 funflush(3)