And this will generate the files as you requested (1 file for the data before the 3 asterisk symbols in a line) and will not generate the fourth one as generated by some other solutions .
I don't believe any of the solutions provided in posts #2 through #4 inclusive generate an extra empty file.
As I was responding, another approach occurred to me. For awk's which support a regexp RS:
Regards,
Alister
My Exchange v5.5 IMS server received an inbound internet-based message that it could not processed. The message header appeared to be corrupt and had a line that read, "Diagnostic-Code: smtp;554 Unallowed chars encountered." The message header also mentions UTF-7. All internet-based messages are... (1 Reply)
I used this on an AIX machine and encountered the following error.
$ ls -l
total 600
-rwxrwxrwx 1 e26936 dba 1491 Feb 07 1992 MANIFEST
-rwxrwxrwx 1 e26936 dba 8148 Apr 05 1992 Makefile
-rwxrwxrwx 1 e26936 dba 4852 Sep 06 2003 README
-rwxrwxrwx... (0 Replies)
When I go$ echo *I get a directory listing.
When I go$ echo * *I get a directory listing, followed by a second identical directory listing.
When I go$ echo **I only get one directory listing. What happens to the second asterisk in this case? Why doesn't it expand? I haven't been able to sleep... (2 Replies)
I am attempting to find all complete words which contain an asterisk at the beginning and the end - for instance, "*Hello?*" or "*you*".
From what I've read, I would have thought that the following expression would do that just fine:
\<\*.*\*\>
\< denoting the beginning of a word.
\*... (12 Replies)
I need to replace occurrences of twelve asterisks "************" with the string " 0000000.00" . Note that there are two spaces in front of the first zero. How can I do this using awk or sed? (3 Replies)
hi
in a script i hate string definitions like
str="***********************************"
who can help to build a 50 character long string of asterisks more elegantly?
any hint is welcome
thanks and regards
lazy (18 Replies)
I have data file that has this in it:
data.txt
.........
.........
PPJ97**2017PPJ97**2017-03-21-13.35.15.887208********************START ERROR LOGGING******************
PPJ97**2017-03-21-13.35.15.887208** PROMPT APPLICATION ERROR **
PPJ97**2017-03-21-13.35.15.887208** IN TIMESTAMP |... (1 Reply)
Note: **Showing Asterisks when using SUDO is not what I am looking for. That method is well documented**
Short Description: We have a requirement where users want to see that they are typing a password when logging into a RedHat box or when they are changing their password -- instead of... (1 Reply)
i need to replace all occurrences of "period asterisk" as it is shown in this:
blah blah .*:.*:.* blah blah
with:
::
so that the end result looks like this:
blah blah :: blah blah
I tried different variations of the following but it didint work:
%s_ .*:.*:.* _ :: _g (2 Replies)
Discussion started by: SkySmart
2 Replies
LEARN ABOUT REDHAT
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)