10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a below file
FILE.cfg
JAN_01
VAR1=4
VAR2=SUM
VAR3=PRIVATE
JAN_10
VAR1=44
VAR2=GUN
VAR3=NATUR
JAN_20
VAR1=3
VAR2=TQN
VAR3=COMMA
code: (JAN_10 is argument passed from script) (6 Replies)
Discussion started by: Roozo
6 Replies
2. Shell Programming and Scripting
Hi Experts,
i am using the below code get the date of previous day.
#!/usr/bin/ksh
datestamp=`date '+%Y%m%d'`
yest=$((datestamp -1))
echo $yest
When i execute the code i am getting output as:
20130715
What i am trying here is, based on the date passed i am fetching previus day's... (0 Replies)
Discussion started by: learner24
0 Replies
3. Shell Programming and Scripting
Hi, I need help to convert the filenames of my 9-year daily files (1999-2007) from a julian day to yyyy-mm-dd format. my original files are patterned likes the ones below.
1999001.txt
1999002.txt
1999003.txt
1999004.txt ...
1999365.txt
desired output:
19990101.txt
19990102.txt... (3 Replies)
Discussion started by: ida1215
3 Replies
4. Fedora
I try to find the first day of our calender. So I used this script ...
echo -n "The week of the date 01jan0001 : "
echo -n `date -d 00010101 +%A`
echo
But its shows error
bash-3.1$ sh first_day.shThe week of the date 01jan0001 : date: invalid date `00010101' (3 Replies)
Discussion started by: krishnampkkm
3 Replies
5. Shell Programming and Scripting
Hello All,
I need a bash shell script to find out a day from the date.For example we give the date(20100227/YYYYMMDD) then we get the day 'Saturday'.
Thanks in advance,
Satheesh (5 Replies)
Discussion started by: satheesh4093
5 Replies
6. Shell Programming and Scripting
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies
7. Shell Programming and Scripting
Hi everyone,
Please help:)
I have a list of 1000 different files which comes daily to the directory.Some of
the files are not coming to the directory now.
I need to write a shell script to find the latest date and time of the files they
came to the directory. The files should be unique.... (1 Reply)
Discussion started by: karthicss
1 Replies
8. Shell Programming and Scripting
i have a directory in which there are executable files and these files are added at runtime. now i need a shell script which will be called at a certain interval. this shell script should find the latest executable file in that directory and start that executable. care should be taken that once the... (6 Replies)
Discussion started by: kvineeth
6 Replies
9. Shell Programming and Scripting
Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies
10. UNIX for Dummies Questions & Answers
I want to buy it (2 Replies)
Discussion started by: LANSTARR.COM
2 Replies
MARK(1) [nmh-1.5] MARK(1)
NAME
mark - manipulate message sequences
SYNOPSIS
mark [+folder] [msgs] [-sequence name ...] [-add | -delete] [-list] [-public | -nopublic] [-zero | -nozero] [-version] [-help]
DESCRIPTION
The mark command manipulates message sequences by adding or deleting message numbers from folder-specific message sequences, or by listing
those sequences and messages.
A message sequence is a keyword, just like one of the "reserved" message names, such as "first" or "next". Unlike the "reserved" message
names, which have a fixed semantics on a per-folder basis, the semantics of a message sequence may be defined, modified, and removed by the
user. Message sequences are folder-specific, e.g., the sequence name "seen" in the context of folder "+inbox" need not have any relation
whatsoever to the sequence of the same name in a folder of a different name.
Three action switches direct the operation of mark. These switches are mutually exclusive: the last occurrence of any of them overrides
any previous occurrence of the other two.
The -add switch tells mark to add messages to sequences or to create a new sequence. For each sequence named via the -sequence name argu-
ment (which must occur at least once) the messages named via msgs (which defaults to "cur" if no msgs are given), are added to the
sequence. The messages to be added need not be absent from the sequence. If the -zero switch is specified, the sequence will be emptied
prior to adding the messages. Hence, -add -zero means that each sequence should be initialized to the indicated messages, while -add
-nozero means that each sequence should be appended to by the indicated messages.
The -delete switch tells mark to delete messages from sequences, and is the dual of -add. For each of the named sequences, the named mes-
sages are removed from the sequence. These messages need not be already present in the sequence. If the -zero switch is specified, then
all messages in the folder are added to the sequence (first creating the sequence, if necessary) before removing the messages. Hence,
-delete -zero means that each sequence should contain all messages except those indicated, while -delete -nozero means that only the indi-
cated messages should be removed from each sequence. As expected, the command "mark -sequence foo -delete all" deletes the sequence "foo"
from the current folder.
When creating or modifying sequences, you can specify the switches -public or -nopublic to force the new or modified sequences to be "pub-
lic" or "private". The switch -public indicates that the sequences should be made "public". These sequences will then be readable by all
nmh users with permission to read the relevant folders. In contrast, the -nopublic switch indicates that the sequences should be made
"private", and will only be accessible by you. If neither of these switches is specified, then existing sequences will maintain their cur-
rent status, and new sequences will default to "public" if you have write permission for the relevant folder. Check the mh-sequence(5) man
page for more details about the difference between "public" and "private" sequences.
The -list switch tells mark to list both the sequences defined for the folder and the messages associated with those sequences. Mark will
list the name of each sequence given by -sequence name and the messages associated with that sequence. If the sequence is private, this
will also be indicated. If no sequence is specified by the -sequence switch, then all sequences for this folder will be listed. The -zero
switch does not affect the operation of -list.
The current restrictions on sequences are:
o The name used to denote a message sequence must consist of an alphabetic character followed by zero or more alphanumeric characters, and
cannot be one of the (reserved) message names "new", "first", "last", "all", "next", or "prev".
o Only a certain number of sequences may be defined for a given folder. This number is usually limited to 27 (11 on small systems). (The
internal implementation relies on bitmasks, with some bits set aside for internal use.)
o Message ranges with user-defined sequence names are restricted to the form "name:n", "name:+n", or "name:-n", and refer to the first or
last `n' messages of the sequence `name', respectively. Constructs of the form "name1-name2" are forbidden for user defined sequences.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
Path: To determine the user's nmh directory
Current-Folder: To find the default current folder
SEE ALSO
flist(1), pick(1), mh-sequence(5)
DEFAULTS
`+folder' defaults to the current folder
`-add' if -sequence is specified, -list otherwise
`msgs' defaults to cur (or all if -list is specified)
`-nozero'
CONTEXT
If a folder is given, it will become the current folder.
HELPFUL HINTS
Use flist to find folders with a given sequence, and "pick sequence -list" to enumerate those messages in the sequence (such as for use by
a shell script).
MH.6.8 11 June 2012 MARK(1)