11-24-2009
You are think of the GNU date implementation. POSIX date does not support those options. GNU unix tools are available as an add-on to Solaris.
6 More Discussions You Might Find Interesting
1. Solaris
when i am executing
setfacl -Rm u:ggoyal2:rwx,m:rwx dir
i am getting error
bash-3.00# setfacl -Rm u:ggoyal2:rwx,m:rwx dir
setfacl: illegal option -- R
usage:
setfacl -f aclfile file ...
setfacl -d acl_entries file ...
setfacl -m acl_entries file ...
setfacl -s acl_entries file... (2 Replies)
Discussion started by: manoj_dahiya22
2 Replies
2. Shell Programming and Scripting
hello. i have a script, but in solaris i get this message sed: illegal option -- i
whats wrong? With Ubuntu there is no problem. Thanks for help.
#!/bin/bash
for file in $(find /directory..../Test/*.txt -type f)
do
head -n 1 $file | egrep '^#!'
if
then
sed -i '2i\Headertext'... (3 Replies)
Discussion started by: fertchen
3 Replies
3. Shell Programming and Scripting
Hi all,
I am trying to execute the following command in a sun solaris machine and getting the error as below.
bash-2.03$ date -d "1 day ago" +%Y%m%d
date: illegal option -- d
bash-2.03$ uname -a
SunOS gtrd02 5.8 Generic_117350-55 sun4u sparc SUNW,Sun-Fire-V440
Can anybody help me to... (1 Reply)
Discussion started by: Tuxidow
1 Replies
4. Shell Programming and Scripting
I'm trying to get the size of each file, but when I try to use
stat -c %s <file>
I get the message
stat: illegal option -- c
Also, the man page for stat shows readlink,stat. It doesn't seem to match the man pages I've seen online.
what is going on here? (6 Replies)
Discussion started by: nextyoyoma
6 Replies
5. Shell Programming and Scripting
For some reason read -e isn't working in my script. I need a directory as input from a user and I'd like for them to be able to use tab complete which is why I'm using -e. When the script is run, I get:
read: line 6: illegal option -e
In order to just figure out what is going on with the -e... (4 Replies)
Discussion started by: orangeSunshine
4 Replies
6. HP-UX
current date command runs well
awk -v t="$(date +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
subtract 30 days fails
awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
awk command in hp unix subtract 30 days automatically from current date without date illegal option error... (20 Replies)
Discussion started by: kmarcus
20 Replies
LEARN ABOUT PHP
date_parse_from_format
DATE_PARSE_FROM_FORMAT(3) 1 DATE_PARSE_FROM_FORMAT(3)
date_parse_from_format - Get info about given date formatted according to the specified format
SYNOPSIS
array date_parse_from_format (string $format, string $date)
DESCRIPTION
Returns associative array with detailed info about given date.
PARAMETERS
o $format
- Format accepted by DateTime.createFromFormat(3).
o $date
- String representing the date.
RETURN VALUES
Returns associative array with detailed info about given date.
EXAMPLES
Example #1
date_parse_from_format(3) example
<?php
$date = "6.1.2009 13:00+01:00";
print_r(date_parse_from_format("j.n.Y H:iP", $date));
?>
The above example will output:
Array
(
[year] => 2009
[month] => 1
[day] => 6
[hour] => 13
[minute] => 0
[second] => 0
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 0
[errors] => Array
(
)
[is_localtime] => 1
[zone_type] => 1
[zone] => -60
[is_dst] =>
)
SEE ALSO
DateTime.createFromFormat(3), checkdate(3).
PHP Documentation Group DATE_PARSE_FROM_FORMAT(3)