Hi,
I have a 5 gig file, no record terminators, field terminators are newline. The record length is 768 and I would like to check that every 768th byte is a newline and print out the byte position if it isn't. I would like to do this going either forward or backwards with one command if... (3 Replies)
Hi,
I am passing date string of format 'YYYYMMDD' to a ksh script.
Will I be able to get next valid date from the passed in string.
Example I pass '20100228' to the shell script, Is there a reverse date command to get '20100301' .i.e to convert '20100228' to date and get next date.... (5 Replies)
File contian below data...
20111101
20111102
20111131
I am new to unix and per scirpt...
First two records are valid and last record is invalid,how to get the valid records...
Please help me unix or perl script.
:wall:
Thanks,
Murali (5 Replies)
Hi All,
I am trying to convert the date of all files under a directory in seconds,
PFB script
a=`ls -lrt | wc -l`
echo $a
for ((i=1;i<=$a;i++))
do
A=`ls -lrt | awk '{print $6,$7,$8}' | head -$i | tail -1`
echo ${A}
date -d '${A}' +%s
donebut I am getting error
date: invalid date... (1 Reply)
Hi All,
I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement:
assume my file has content:
hello= gsdgsd sfdsg sgdsg sgdgdg
world= gggg hhhh iiiii
xxxx= pppp ppppp pppp
my... (5 Replies)
My question is how would i loop a read command to keep asking the user for input and eventually print the no. of valid invalid inputs after a specified control input typed i.e. (-3). (1 Reply)
Hi, I have a function to calculate "yesterday" in format YYYYMMDD:
desa_ev9 # date +"%Y%m%d" --date "-1 day 20180701"
20180630
desa_ev9 # date +"%Y%m%d" --date "-1 day 20180720"
20180719
desa_ev9 # date +"%Y%m%d" --date "-1 day 20190101"
20181231
desa_ev9 # date +"%Y%m%d" --date "-1... (2 Replies)
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Hello.
I can use any particular (stupid or not) format when using bash date command.
Example :
~> date --date "now" '+%Y-%m-%d %H!%M!%S'
2019-06-03 12!55!33or
~> date --date "now" '+%Y£%m£%d %H¤%M¤%S'
2019£06£03 12¤57¤36
or
~> date --date "now" '+%Y-%m-%d %H-%M-%S'
2019-06-03 12-58-51
... (4 Replies)
Discussion started by: jcdole
4 Replies
LEARN ABOUT SUNOS
mailq
mailq(1) User Commands mailq(1)NAME
mailq - print the mail queue
SYNOPSIS
/usr/bin/mailq [-Ac] [-q subarg] [-v]
DESCRIPTION
The mailq utility displays a summary of the mail messages queued for future delivery.
The first line displayed for each mail message shows the internal identifier used on this host for the message, the size of the message in
bytes, the date and time the message was accepted into the queue, and the envelope sender of the message. The second line of the display
shows the error message that caused this message to be retained in the queue. This line will not be displayed if the message is being pro-
cessed for the first time.
The mailq utility used to be identical to sendmail -bp. Now it checks for the authorization attribute, solaris.mail.mailq. If the check for
the invoking user succeeds, sendmail -bp is executed with the remaining argument vector. Otherwise, an error message is printed. This
authorization attribute is by default enabled for all users. It can be disabled by modifying the Basic Solaris User entry in prof_attr(4).
OPTIONS
The following options are supported:
-Ac Like sendmail(1M), this flag tells mailq to use submit.cf rather than sendmail.cf even if the operation mode does not
indicate an initial mail submission. This will result in the client queue /var/spool/clientmqueue being displayed rather
than the default server queue /var/spool/mqueue.
-qp[time] Similar to -qtime, except that instead of periodically forking a child to process the queue, sendmail forks a single per-
sistent child for each queue that alternates between processing the queue and sleeping. The sleep time is given as the
argument. The sleep time default is 1 second. The process will always sleep at least 5 seconds if the queue was empty in
the previous queue run.
-qf Processes saved messages in the queue once and does not fork(), but runs in the foreground.
-qG name Processes jobs in the queue group called name only.
-q[!]I substr Limits processed jobs to those containing substr as a substring of the queue id, or not when ! is specified.
-q[!]R substr Limits processed jobs to those containing substr as a substring of one of the recipients, or not when ! is specified.
-q[!]S substr Limits processed jobs to those containing substr as a substring of the sender, or not when ! is specified.
-v Prints verbose information. This adds the priority of the message and a single character indicator (+ or blank) indicating
whether a warning message has been sent on the first line of the message. Additionally, extra lines may be intermixed with
the recipients that indicate the "controlling user" information. This shows who will own any programs that are executed on
behalf of this message and the name of the alias this command is expanded from, if any.
EXIT STATUS
0 Successful completion.
>0 An error occurred.
FILES
/etc/security/prof_attr local source for execution profile attributes
/var/spool/mqueue default server queue
/var/spool/clientmqueue client queue
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsndmu |
+-----------------------------+-----------------------------+
SEE ALSO sendmail(1M), prof_attr(4), attributes(5)SunOS 5.10 10 Jul 2002 mailq(1)