11-21-2014
Thank you! Will try this and let know
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
We have four filenames with first few digits are identical.From those files, i need to pick up 2 files based on my parameter.
The following example will give more information to understand my question.
Files in the directory:
small_customer_aa.csv
small_customer_ab.csv... (6 Replies)
Discussion started by: HAA
6 Replies
2. Shell Programming and Scripting
how can i read a part of filename from the list in the script?
all file in directory...will start with "CDBACKUPFILE" then the name is stored in list.txt such as JOHN,MARRY,PETER. After this, is seq number.
CDBACKUPFILEJOHN00001
CDBACKUPFILEMARRY00004
CDBACKUPFILEPETER00003
I will use:... (3 Replies)
Discussion started by: happyv
3 Replies
3. Shell Programming and Scripting
I have a text file containing files in a directory structure i.e.
/project/hr/raw/jcpdatav/datav_aug03
/project/hr/raw/jcpdatav/comb8121sep02n
/project/hr/raw/jcpdatav/datav_feb04_ons
/project/hr/raw/jcpdatav/corpsick_jun06
/project/hr/raw/jcpdatav/jcpjoiners200507... (3 Replies)
Discussion started by: mr_crosby
3 Replies
4. Shell Programming and Scripting
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
Discussion started by: natalie23
3 Replies
5. Shell Programming and Scripting
Hello, here is my problem:
I have ma program in a first directory dir1:
ls path1/rep1/
file1.f90 file1.f90~ file1.o file2.f90 .... etc...
I have modified folder in an other directory:
ls path2/rep2/
file1_modified.f90 file2_modified.f90 .... etc...
All files from first... (8 Replies)
Discussion started by: shadok
8 Replies
6. Shell Programming and Scripting
I am using the following to script to sort and process files in order
find $eventsFolder${cameraList} -mtime -365 -name \*capture.jpg > /tmp/alarmvideos/${cameraname}.list
# use local time settings to order the events right.
export LC_ALL=C
sort /tmp/alarmvideos/${cameraname}.list -n -o... (1 Reply)
Discussion started by: ddalton
1 Replies
7. Shell Programming and Scripting
Hey guys,
Sorry for the basic question but I have a lot of files that I want to separate into groups based on filenames which I can then cat together. Eg I have:
(a_b_c.txt)
WB34_2_SLA8.txt
WB34_1_SLA8.txt
WB34_1_DB10.txt
WB34_2_DB10.txt
WB34_1_SLA8.txt
WB34_2_SLA8.txt
77_1_SLA8.txt... (1 Reply)
Discussion started by: Breentax
1 Replies
8. Shell Programming and Scripting
HI
owner date and time and size of file in a row
shell script to list filename file_path i have tried the below code
present_dir=`pwd`
dir=`dirname $0`
list=`ls -lrt | awk {'print $9,$3,$6,$7,$8'}`
size=`du -h`
path=`cd $dir;pwd;`
printf "$list"
printf "$path"
printf " $size"
... (4 Replies)
Discussion started by: abiram
4 Replies
9. UNIX for Dummies Questions & Answers
Dear unix forum,
could I output a list of five books with their file name titles into one file?
In order o output all the contents of all the files with their file names there was: find . -type f | while read x; echo -e "\n$x";cat "$x";done > бетховен.txt
In spite of them being successively... (5 Replies)
Discussion started by: Xcislav
5 Replies
10. Shell Programming and Scripting
I wish to list only files along with the absolute path in a given directory on my AiX 6.1 system.
Below is the best I could do.
ls -p "/app/scripts"/*
This gives a a list of all filename along with folder names with absolute path non-recurrsive (without listing files in sub-directories)... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT PHP
date_sunset
DATE_SUNSET(3) 1 DATE_SUNSET(3)
date_sunset - Returns time of sunset for a given day and location
SYNOPSIS
mixed date_sunset (int $timestamp, [int $format = SUNFUNCS_RET_STRING], [float $latitude = ini_get("date.default_latitude")], [float
$longitude = ini_get("date.default_longitude")], [float $zenith = ini_get("date.sunset_zenith")], [float $gmt_offset])
DESCRIPTION
date_sunset(3) returns the sunset time for a given day (specified as a $timestamp) and location.
PARAMETERS
o $timestamp
- The $timestamp of the day from which the sunset time is taken.
o $format
-
$format constants
+-----------------------+-------------------------------------------+
| constant | |
| | |
| | description |
| | |
| | example |
| | |
+-----------------------+-------------------------------------------+
| SUNFUNCS_RET_STRING | |
| | |
| | returns the result as string |
| | |
| | 16:46 |
| | |
| SUNFUNCS_RET_DOUBLE | |
| | |
| | returns the result as float |
| | |
| | 16.78243132 |
| | |
|SUNFUNCS_RET_TIMESTAMP | |
| | |
| | returns the result as integer (timestamp) |
| | |
| | 1095034606 |
| | |
+-----------------------+-------------------------------------------+
o $latitude
- Defaults to North, pass in a negative value for South. See also: date.default_latitude
o $longitude
- Defaults to East, pass in a negative value for West. See also: date.default_longitude
o $zenith
- Default: date.sunset_zenith
o $gmtoffset
- Specified in hours.
ERRORS
/EXCEPTIONS
Every call to a date/time function will generate a E_NOTICE if the time zone is not valid, and/or a E_STRICT or E_WARNING message if using
the system settings or the $TZ environment variable. See also date_default_timezone_set(3)
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.1.0 | |
| | |
| | Now issues the E_STRICT and E_NOTICE time zone |
| | errors. |
| | |
+--------+---------------------------------------------------+
RETURN VALUES
Returns the sunset time in a specified $format on success or FALSE on failure.
EXAMPLES
Example #1
date_sunset(3) example
<?php
/* calculate the sunset time for Lisbon, Portugal
Latitude: 38.4 North
Longitude: 9 West
Zenith ~= 90
offset: +1 GMT
*/
echo date("D M d Y"). ', sunset time : ' .date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1);
?>
The above example will output something similar to:
Mon Dec 20 2004, sunset time : 18:13
SEE ALSO
date_sunrise(3).
PHP Documentation Group DATE_SUNSET(3)