08-28-2013
Great Thanks! Exactly what I was looking for.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I have a file that looks like this
dasdjasdjoasjdoasjdoa SYN dakspodkapsdka
asdasdasdasdasdasdasd SYN sdfsdfsdfsdfdf
shfishifhsdifhsidhfif fsdfsdfsdfsdfs
sdfsdfsdfsdsdfsdfsdff cercercercerce
sdasdajsdoajsodasodoo FIN dasdaskdpasdda... (4 Replies)
Discussion started by: hcclnoodles
4 Replies
2. Shell Programming and Scripting
hi all,
I have a text file with following content
PAGENUMBER
asasasa
asasasa
PAGENUMBER
sasasasasa
PAGENUMBER
using sed i want to replace PAGENUMBER by occurrence count
eg
1
asasasa
asasasa
2
sasasasasa
3 (4 Replies)
Discussion started by: uttamhoode
4 Replies
3. Shell Programming and Scripting
I am trying to get rid of some ending tags but I run into some problems.
Ex.
How are you?</EndTag><Begin>It is fine.</Begin><New> Just about
I am trying to get rid of the ending tags, starts with </ and ending with >. (which is </EndTag> and </Begin>)
I tried the following
sed... (2 Replies)
Discussion started by: quixoticking11
2 Replies
4. Shell Programming and Scripting
Hi, I am totally new to shell scripting.
I have a String "c:\working\html\index.txt.12-12-2009.bkp" I want to check if the string has more than one "." character. If it does I would like to retrieve only "c:\working\html\index.txt" i.e, discard the second occurrence of "." and the rest of the... (7 Replies)
Discussion started by: imr
7 Replies
5. Shell Programming and Scripting
Lets say I have file.txt:
(Product:Price:QuantityAvailable) (: as delimiter)
Chocolate:5:5
Banana:33:3
I am doing a edit/update function.
I want to change the Quantity Available, so I tried using the SED command to replace 5, but my Price which is also 5 is changed instead.
(for the Banana... (13 Replies)
Discussion started by: andylbh
13 Replies
6. Shell Programming and Scripting
Ok,
So I have a huge file that has over 12000 lines in it.
in this file, there are 589 occurrences of the string "use five-minute-interval" spread in various areas in the file.
How can i replace the the last 250 of the occurrences of "use five-minute-interval" with "use... (10 Replies)
Discussion started by: SkySmart
10 Replies
7. Shell Programming and Scripting
I couldn't find the answer anywhere, so I hope you could help me.
I need to change something like the following:
something/bla/aaaa
anything/bbb
to:
something
--bla
----aaaa
anything
--bbb
How do I do this?
Is it possible with sed?
I tried various patterns, but don't know how to... (5 Replies)
Discussion started by: Patwan
5 Replies
8. Shell Programming and Scripting
I'm using sed to switch integers (one or more digits) to the other side of the ':' colon. For example: "47593:23421" would then be "23421:47593". The way it functions right now, it is messing my settings file to use with gnuplot. The current command is:
sed 's/\(*\):\(*\)/\2:\1/' out3 >... (3 Replies)
Discussion started by: D2K
3 Replies
9. UNIX for Dummies Questions & Answers
I have the following script:
sed '/string1/,/string2/!d' infile
I want to apply the script to the first occurrence only. I have tried
sed '0,/string1/,/string2/!d' infile
Of course, that does not work
Any help will be greatly appreciated (12 Replies)
Discussion started by: Xterra
12 Replies
10. Shell Programming and Scripting
Hi, i have file file.txt with data like:
START
03:11:30 a
03:11:40 b
END
START
03:13:30 eee
03:13:35 fff
END
jjjjjjjjjjjjjjjjjjjjj
START
03:14:30 eee
03:15:30 fff
END
ggggggggggg
iiiiiiiiiiiiiiiiiiiiiiiii
I want the below output
START (13 Replies)
Discussion started by: Jyotshna
13 Replies
PHEAR(6) Games Manual PHEAR(6)
NAME
phear - enter the cavez of phear
SYNOPSIS
phear [-e <level filename>] | [level name]
OPTIONS
This program has several arguments:
-e Start editor instead of game on a specific level.
level name
Name of the level to play, f.ex 01
level filename
Filename of the level to edit. f.ex /usr/share/phear/data/levels/01
DESCRIPTION
This is a boulder dash type of game, for terminals. You walk around in a ASCII underground cave system, where you need to keep clear of
boulders falling down while you are digging through the dirt searching for diamonds.
To play you have to know these keys:
right - move right
left - move left
up - move up
down - move down
b - place bomb
t - detonate bombs
q - leave game
By picking up a diamond (*) you get 10 points, picking up money ($) gives you 100 points. You get one extra life for every 1000 points you
score.
Move around with the arrow keys or the 2-4-8-6 keys. Press 'k' to commit suicide if you should get stuck.
Got the bombs (%)? Great! Press 'b' to place them, and 't' to detonate them all at once. Note that the bombs you place will act just like
stones, affected by gravity, rolling, and so on..
Watch out for monsters (M) -- if they catch you, you will die. To fight back, drop stones on them or blow them up using your bombs.
Pressing 's' will enable/disable sound, 'w' will highlight your current position.
EDITOR
The editor has its own keys you need to know:
0-9 - Keys 0-9 places objects
s - Saves the map
l - Enables lock-mode (lets you draw continuously using the arrow-keys)
q - Quits the editor
AUTHOR
Cavez of Phear was written by Tom Rune Flo <tom@x86.no>.
This manual page was written by Hakon Nessjoen <haakon.nessjoen@gmail.com>, with parts of it written by Tom Rune Flo <tom@x86.no>, for the
Debian project (and may be used by others).
November 30, 2011 PHEAR(6)