I rather have all the References within my script (I really do not like the idea of having external files)
I am not getting the expected result. ALl the information in the file is being replaced by the reference sequence.
I have been trying with awk, I just cannot get it to do what I want.
I am not big with awk, but the original code I posted can be modified to use ksh93 as follows:
Note that, on my Mac OS X, the default ksh shell itself is ksh93, but on lots of Unix systems there are separate executables for ksh and ksh93. If your system has only ksh, if the following command gives an output similar to what is shown, its ksh93, else not:
Hello, i need some help with a perl script.
i need to add the lines:
#ifdef LOGALLOC
#include "logalloc.h"
#endif // LOGALLOC
To all c and h files in a project with subdirectories.
Logalloc is a tool to log all *alloc and free's in a text file, it defines the *alloc funtions new.... (2 Replies)
hi,
I want to combine two lines in same file. If the line ends with '&' it should belongs to previous line only
Here i am writing example.
Ex1:
line 1 : return abcdefgh&
line 2 : ijklmnopqr&
line 3 : stuvw&
line 4 : xyz
output should be
line 1: return abcdefghijklmnopqrstuvwxyz
... (11 Replies)
Hi ,,
i have the below file...
D 2342135
B 214236
C argjlksd
V lskjrghaklsr
C slkrgj
B sdg4tsd
E aslkgjlkasg
i want to sort the lines into different files based on the starting letter of the line. so that i have different files for lines starting with a letter.
thanks (1 Reply)
I have posted this before but did not get many replies, so here it goes again.
I have several files name like this
If the file extension is 1a, I woould like to add at the beggining of the file the following sequence
If the file extension is 1b, thn the entry that should be added is the next... (2 Replies)
I'm rather new to programming, and am attempting to combine lines from 2 files in a way that is way beyond my expertise - any help would be appreciated!
I need to take a file (file1) and add columns to it from another file (file2). However, a line from file2 should only be added to a given line... (3 Replies)
hi
i have a set of similar files. i want to delete lines until certain pattern appears in those files. for a single file the following command can be used but i want to do it for all the files at a time since the number is in thousands.
awk '/PATTERN/{i++}i' file (6 Replies)
I have two files, a keepout.txt and a database.csv. They're unsorted, but could be sorted.
keepout:
user1
buser3
anuser19
notheruser27
database:
user1,2343,"information about",field,blah,34
user2,4231,"mo info",etc,stuff,43
notheruser27,4344,"hiya",thing,more thing,423... (4 Replies)
Dear all,
I have a list of files and I woulk like to concatenate some of them based on their name.
Basically my files are names like that:
file1_abcd_other_useless_letters_1_C1.txt
file1_abcd_other_useless_letters_1_C2.txt
file1_xywz_other_useless_letters_1_C1.txt... (4 Replies)
Discussion started by: giuliangiuseppe
4 Replies
LEARN ABOUT SUNOS
mark
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)