Show us the script you're using to get 1.file ... 9.file10.file... and we'll show you how to simply modify it to produce numbers with a specified number of digits with leading zeros. Note that something like:
Code:
printf '%04d.file' $number
is likely to be at the heart of it (for four digit sequence numbers).
The GNU date command in full of goodies but not when it comes to calculate a date or time difference. Here is what I came up with after looking to more than one solution.
Code should be self explaining.
#!/bin/bash
date2stamp () {
date --utc --date "$1" +%s
}
stamp2date (){
... (0 Replies)
Hi all!
I'm working on a HPUX system, and I was wondering if there is a simple way to convert a date from seconds (since 1970) to a normal date.
Thanks (2 Replies)
i have a script that grep for today date
a=`date +"%F"`--------greps current/today date
wat if suppose i want to grep a date for yesterday...
how to do that using the above format: i,e 2008-01-20 (4 Replies)
Hi guys,
I have some embedded perl within my shell script to get me the modification time/date of a file which returns me the following string:
Fri May 1 09:52:58 2009
I have managed to get the bits i need such as 1-May-2009, but what i would prefer is 010509 instead...
Here is my... (4 Replies)
Hi all,
i have used the search already before someone shouts at me and i have seen the 'datecalc' program but this is not working correctly for me in the shell and environment i am using.
I am using solaris 10 and bourne shell.
I have two dates '07-04-2009' and '05-05-2009'. I just need to... (2 Replies)
Hi Gurus,
Please help in this shell script.
x=000
y=`expr $x + 1`
echo $y
which gives me the value as 1
How can i get the value as 001 in this shell script. As i am new to scripting stuck up here.
Requesting here help here (2 Replies)
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
There is a closed Thread: <url>Here will be the url to the original post once I have 5 posts in this forum...</url>
But a small bug had found his way into this very cool and simple code.
#!/bin/bash date2stamp () { date --utc --date "$1" +%s } stamp2date (){ date --utc --date... (2 Replies)
Hi ,
Here is the smaller version of the problem.
Working individually as command
************************>echo $SHELL
/bin/bash
************************>TO_DAY=`date`
************************>echo $TO_DAY
Tue Jul 16 02:28:31 EDT 2013
************************>
Not working when... (5 Replies)
Hi,
I'm looking for a way to do a simple math calc during a shell script as a means of logging how long a particular task takes.
For example...
STARTTIME=whenever this script starts
./path/to/command.sh >>logfile.log
TOTALTIME=<time at this stage of the script after above command... (7 Replies)
Discussion started by: nbsparks
7 Replies
LEARN ABOUT SUSE
pfsintiff
pfsintiff(1) General Commands Manual pfsintiff(1)NAME
pfsintiff - Load images or frames in several variants of TIFF format (both LDR and HDR)
SYNOPSIS
pfsintiff (<file> [--linear] [--frames <range>] [--skip-missing]) [<file>...]
DESCRIPTION
pfsintiff command loads images in TIFF format and writes pfs stream to the Standard Output. The pfs stream is usually piped to another pro-
gram for further processing. To detect the format automatically based on the extension, use pfsin command.
Both the standard LDR tiff and extended HDR (logLuv encoding http://www.anyhere.com/gward/pixformat/tiffluv.html); Note that both LDR and
HDR tiff files provide photometric data (ie linearly related to luminance). The 'LUMINANCE' tag is set to 'RELATIVE', also the '--linear'
switch is ignored.
To read images from standard input use a single dash '-' instead of filename. The images are read until EOF is reached.
Each file can contain a %d pattern, which is substituted with frame numbers. The pattern has the same syntax as C printf command. For exam-
ple, you can use %04d to make the frame number four digit with proceedings zeros. You can select the frames using the following options
(the options must be always given after the file name):
--frames <range>
Range is given in mathlab / octave format:
startframe:step:endframe
Frame numbers start with startframe (default 0), are increased by step (default 1) and stop at endframe You can skip one of those
values, for example 1:100 for frames 1,2,...,100 and 0:2: for frame 0,2,4,... up to the last file that exists.
--skip-missing
Skip up to ten frames in a row if corresponding files are missing. Otherwise the program stops reading sequence at the first file
that does not exists. This switch does not apply to the first frame in a sequence. This switch can be useful if there is a rendered
animation where some of the frame has not been generated.
--linear
Ignored for compatibility with pfsinppm.
EXAMPLES
pfsintiff frame%04d.tif --frames 0:10 | pfsview
Read frames from files frame0000.tif, frame0001.tif, ..., frame0010.tif and show them using pfsview.
BUGS
Please report bugs and comments on implementation to the discussion group http://groups.google.com/group/pfstools
SEE ALSO pfsin(1), pfsout(1)pfsintiff(1)