06-11-2012
Thanks for your In depth reply. I am pretty ok with the fact that sed does not work with multiple lines easily, and that it's core functionality is to work line by line. This is just a curious question. I will look at the man pages some more (believe me I already did) but it can get a bit mind boggling for a beginner
however, now that I know what to look for (the flags you have suggested) it should be easier.
10 More Discussions You Might Find Interesting
1. AIX
Hello I have a flesystem that has run out of space. I have tried using the following command to add space:
# chfs -a size=+100 /lsrc
I get the following error:
0516-404 allocp: This system cannot fulfill the allocation request.
There are not enough free partitions or not enough... (9 Replies)
Discussion started by: dkranes
9 Replies
2. Linux
I am on Red Hat Linux 4.7.
I am getting this error message:
Preparing... ###########################################
You have insufficient diskspace in the destination directory (/usr/lib) to
install xxxxxxxxxxxxx. The installation requires at
least 1.5 GB free on this... (2 Replies)
Discussion started by: jxh461
2 Replies
3. HP-UX
Hello, I am trying to add space to my existing system and I need a little assistance determining if I have any disk space available to allocate. Here is what I have:
DISKS:
Class I H/W Path Driver S/W State H/W Type Description... (1 Reply)
Discussion started by: dkranes
1 Replies
4. UNIX for Dummies Questions & Answers
I need to add space to certain directory. I believe I need to add space to the filesystem this directory belongs to. How can I find out what filesystem this directory belongs to? (3 Replies)
Discussion started by: NycUnxer
3 Replies
5. Shell Programming and Scripting
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
6. Shell Programming and Scripting
i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies
7. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
8. Shell Programming and Scripting
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
9. Shell Programming and Scripting
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 Replies
10. Shell Programming and Scripting
hi,
I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
CHING(6) Games Manual CHING(6)
NAME
ching - the book of changes and other cookies
SYNOPSIS
/usr/games/ching [ hexagram ]
DESCRIPTION
The I Ching or Book of Changes is an ancient Chinese oracle that has been in use for centuries as a source of wisdom and advice.
The text of the oracle (as it is sometimes known) consists of sixty-four hexagrams, each symbolized by a particular arrangement of six
straight (---) and broken (- -) lines. These lines have values ranging from six through nine, with the even values indicating the broken
lines.
Each hexagram consists of two major sections. The Judgement relates specifically to the matter at hand (E.g., "It furthers one to have
somewhere to go.") while the Image describes the general attributes of the hexagram and how they apply to one's own life ("Thus the supe-
rior man makes himself strong and untiring.").
When any of the lines have the values six or nine, they are moving lines; for each there is an appended judgement which becomes signifi-
cant. Furthermore, the moving lines are inherently unstable and change into their opposites; a second hexagram (and thus an additional
judgement) is formed.
Normally, one consults the oracle by fixing the desired question firmly in mind and then casting a set of changes (lines) using
yarrow-stalks or tossed coins. The resulting hexagram will be the answer to the question.
Using an algorithm suggested by S. C. Johnson, the UNIX oracle simply reads a question from the standard input (up to an EOF) and hashes
the individual characters in combination with the time of day, process id and any other magic numbers which happen to be lying around the
system. The resulting value is used as the seed of a random number generator which drives a simulated coin-toss divination. The answer is
then piped through nroff for formatting and will appear on the standard output.
For those who wish to remain steadfast in the old traditions, the oracle will also accept the results of a personal divination using, for
example, coins. To do this, cast the change and then type the resulting line values as an argument.
The impatient modern may prefer to settle for Chinese cookies; try fortune(6).
SEE ALSO
It furthers one to see the great man.
DIAGNOSTICS
The great prince issues commands,
Founds states, vests families with fiefs.
Inferior people should not be employed.
BUGS
Waiting in the mud
Brings about the arrival of the enemy.
If one is not extremely careful,
Somebody may come up from behind and strike him.
Misfortune.
7th Edition May 20, 1985 CHING(6)