05-27-2002
delete lines
I have more than 1500 line and 30 files. if I use vi and "dd" I can complete until end of my life.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I want to delete first five and last five lines in text files without opening the file and also i want to keep the same file name for all the files.
Thanks in advance!!!
Ragav (10 Replies)
Discussion started by: ragavendran31
10 Replies
2. Shell Programming and Scripting
Hi
I am writing a script which should read a file and search for certain strings 'approved' or 'removed' and retain only those lines that contain the above strings.
Ex: file name 'test'
test:
approved package
waiting for approval package
disapproved package
removed package
approved... (14 Replies)
Discussion started by: vj8436
14 Replies
3. Shell Programming and Scripting
Input:
a
b
b
c
d
d
I need:
a
c
I know how to get this (the lines that have duplicates) :
b
d
sort file | uniq -d
But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Discussion started by: necroman08
3 Replies
4. Shell Programming and Scripting
First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible )
I got a file (trace file to recreate the control file from oracle for the dba boys)
which contains
some lines
another line... (11 Replies)
Discussion started by: plelie2
11 Replies
5. UNIX for Dummies Questions & Answers
Hiiii
I have a file which contains huge data as
a.dat:
PDE 1990 1 9 18 51 28.90 24.7500 95.2800 118.0 6.1 0.0 BURMA
event name: 010990D
time shift: 7.3000
half duration: 5.0000
latitude: 24.4200
longitude: 94.9500
depth: 129.6000
Mrr: ... (7 Replies)
Discussion started by: reva
7 Replies
6. Shell Programming and Scripting
Hello,
I have a group of text files with many lines in each file.
I need to delete all the lines in each and only leave 2 lines in each file. (3 Replies)
Discussion started by: script_op2a
3 Replies
7. UNIX for Advanced & Expert Users
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies
8. Shell Programming and Scripting
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies
9. Shell Programming and Scripting
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies
10. UNIX for Beginners Questions & Answers
Hi all,
I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex:
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
LEARN ABOUT DEBIAN
passage
passage(6) Games passage(6)
NAME
passage - a game about the passage through life
SYNOPSIS
passage
DESCRIPTION
Passage is a video game written by Jason Rohrer about navigating the maze that is life and the obstacles, rewards, disappointments, chal-
lenges, relationships and the inevitable departure that is part of the adventure of life.
Passage is an art game. As a result, some people love it and some people hate it. Check out the links to places it has been discussed on
the website for some of the reactions.
The mechanics of the game are fairly simple. Your "score" is related to two things; exploration and treasure. Treasure pieces are repre-
sented by blue stars that you find in the treasure chests scattered about the maze of life's challenges. Some chests will be empty, so you
must learn which sequence of gems on the front of the chests means treasure is inside. You have the option to team up with a spouse. If
you do, exploring life will be more rewarding but some treasure will no longer be reachable. As in life, your spouse will die and that
death will slow you down. In the end, you will die alone after your 5 minutes is up.
The most interesting part about this game is the emotions it evokes within the player of the game. The ultra-low-res pixel art helps here,
by not being too distracting and by leaving plenty room for viewer interpretation.
The followup to Passage is Gravitation, another art game by Jason Rohrer.
USAGE
Passage has no command-line options.
The arrow keys move the player around.
The Esc key is used to quit the game.
The game resolution and use of fullscreen or a window can be set by editing the files in /etc/passage.
SEE ALSO
The website and discussion: http://hcsoftware.sourceforge.net/passage/
The game creators statement: http://hcsoftware.sourceforge.net/passage/statement.html
March 2008 passage(6)