05-14-2018
Enclose the $line in double quote to have the shell preserve spaces within.
But, I may be thick-witted, but the entire problem escapes me, even with the new sample.
OK, you have the OS - however determined - in the first field. What is the second field for? And, why not just list the commands to be executed in a list right after the OS paragraph header?
Please give some consistent context / background to help people understand what you're after. The HP-UX problem from post#1 seems to have disappeared in the new sample?
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to go through the list of items and run it.
while running it, some of them will have either
>there is no response # and then end it... so that it can go to next item
OR
>there is response # but in order to break out of it, u need to do Control c.
How do you send control... (6 Replies)
Discussion started by: hankooknara
6 Replies
2. Shell Programming and Scripting
I have the following statement in script:
find ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN2} -print | while read file; do
...
done
When there are no files located by the find comand it returns:
"find: bad status-- /home/rnitcher/test/....." to the command line
How do I get control in... (3 Replies)
Discussion started by: mavsman
3 Replies
3. Shell Programming and Scripting
Hi,
I have taken a piece of code from a book, which is working as per the specification. The code....
for entry in *
do
if
then
echo $entry
fi
done
The sub-directories present in the current directory will be displayed while executing.
... (3 Replies)
Discussion started by: saravanakumar
3 Replies
4. Shell Programming and Scripting
I have an empty .gz file in archival directory. And I am redirecting to a dat file. My while loop is not getting ended. I need the solution.
cnt=0
while read line
do
cnt=`expr $cnt + 1`
echo "$ARCH_DIR/$line.gz" >> $DATA_DIR/$FILE_LIST_FILE_FEB
FILE_NAMES=${FILE_NAMES}"... (2 Replies)
Discussion started by: vinodh1978
2 Replies
5. Shell Programming and Scripting
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies
6. UNIX for Dummies Questions & Answers
Hi All
How can i control for loop with two different variables in csh shell
Regards
Nikhil (1 Reply)
Discussion started by: Nikhilindurkar
1 Replies
7. Shell Programming and Scripting
Hi
I would like to exit the loop below on <Enter> even if it sleeps. Is it possible?
while true
do
my_procedure;
sleep 60
done
Thanks (7 Replies)
Discussion started by: zam
7 Replies
8. Shell Programming and Scripting
Hello,
I would like to control and check the right parameters
$1 must have 4 alphabetics digits among eora qora pora fora
$2 must have 2 numerics digits 00 to 11
$3 must have 2 numerics digits 00 to 59
$4 must have 10 characters alpha numerics as 2013-02-26
For example :
In case 5) if i... (1 Reply)
Discussion started by: amazigh42
1 Replies
9. Shell Programming and Scripting
Hello,
I would like to control and check the right parameters
$1 must have 4 alphabetics digits among eora qora pora fora
$2 must have 2 numerics digits 00 to 11
$3 must have 2 numerics digits 00 to 59
$4 must have 10 characters alpha numerics as 2013-02-26
For example :
In case 5) if i... (15 Replies)
Discussion started by: amazigh42
15 Replies
10. Shell Programming and Scripting
Hello All,
I have an awk script which parses my log file and prints number grepping from a specific line/pattern, now i have to come with a shell script to continue reading the log untill the job is completed, which i would know while reading session log untill process encounters a final... (1 Reply)
Discussion started by: Ariean
1 Replies
ANNO(1) [nmh-1.5] ANNO(1)
NAME
anno - annotate messages
SYNOPSIS
anno [+folder] [msgs] [-component field] [-inplace | -noinplace] [-date | -nodate] [-draft] [-append] [-list] [-delete] [-number [num|all]]
[-preserve | -nopreserve] [-version] [-help] [-text body]
DESCRIPTION
Anno manipulates header fields or annotations in messages. Header fields consist of a field name and an optional field body as defined by
RFC-2822. The -component option specifies the field name, and the -text option specifies the field body.
The messages are either the msgs in the named folder, or the draft if invoked with the -draft option.
Usually, annotation is performed by the commands dist, forw, and repl, if they are given the -anno switch. This allows you to keep track
of your distribution of, forwarding of, and replies to a message.
By using anno, you can perform arbitrary annotations of your own. Each message selected will be annotated with the lines
field: date
field: body
The -nodate switch inhibits the date annotation, leaving only the body annotation.
By default, anno prepends the annotations to the message. Annotations are instead appended if the -append option is specified.
If a -component field is not specified when anno is invoked, anno will prompt the user for the name of field for the annotation.
The field specified must be a valid 2822-style message field name, which means that it may only consist of alphanumerics and dashes, The
body specified is arbitrary text.
Normally anno does the annotation inplace in order to preserve any links to the message. You may change this by using the -noinplace
switch.
The -list option produces a listing of the field bodies for header fields with names matching the specified component, one per line. The
listing is numbered, starting at 1, if the -number option is also used. A tab character separates the number and the field body. The
field body is treated as if it is a file name, and only the final path name component is listed. The complete field body is listed if the
-text option is used, the contents of the text are ignored.
The -delete option removes header fields from messages. The first header field whose name matches the component is deleted if no other
options are specified. If the -text option is used in conjunction with the -delete option, the first header field whose name matches the
component and whose body matches the text is deleted. The text is treated as if it was a file name; if it begins with a slash, the entire
field body must match the text, otherwise just the last path name component of the field body must match. If the -number option is used in
conjuction with the -delete option, header field num whose name matches the component is deleted. The number matches that which is pro-
duced by the -list option. The special value all can be used for the number, and causes all components that match the name to be deleted.
By default, anno changes the last-accessed and last-modified times on annotate messages to the time at which the annotation occurs. Anno
preserves the original times if the -preserve option is used. A matching -nopreserve option exists that allows time preservation to be
turned off if enabled in the profile.
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
dist(1), forw(1), repl(1)
DEFAULTS
`+folder' defaults to the current folder
`msgs' defaults to cur
`-inplace'
`-date'
CONTEXT
If a folder is given, it will become the current folder. The first message annotated will become the current message.
MH.6.8 11 June 2012 ANNO(1)