Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Deleting/Removing sentence from .txt Post 302492147 by santonio on Sunday 30th of January 2011 04:04:34 AM
Old 01-30-2011
Thanks! PRoblems solved!

sed "/$Title/d" BookDB.txt > BookDB1.txt && mv BookDB1.txt BookDB.txt does the trick! =)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

echo "ABC" > file1.txt file2.txt file3.txt

Hi Guru's, I need to create 3 files with the contents "ABC" using single command. Iam using: echo "ABC" > file1.txt file2.txt file3.txt the above command is not working. pls help me... With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies

2. Shell Programming and Scripting

Script for removing text from a txt file

Hello, So I wanted to write a very simple script to remove some information from a text file and save it as something else. For example I have a text file (let's call it txt) with three rows of numbers: 0 0 1 9 8 7 5 0 6 7 9 0 0 7 9 8 1 1 6 4 0 6 0 0 9 8 4 6 0 9 2 8 1 And I want to... (2 Replies)
Discussion started by: hertingm
2 Replies

3. Shell Programming and Scripting

Deleting lines that contain spaces in a txt file

I need some help deleting lines in a file that contain spaces. Im sure awk or sed will work but i dont know much about those commands. Any help is appreciated :D (7 Replies)
Discussion started by: r04dw4rri0r
7 Replies

4. UNIX for Dummies Questions & Answers

Script to ask for a sentence and then count number of spaces in the sentence

Hi People, I need some Help to write a unix script that asks for a sentence to be typed out then with the sentence. Counts the number of spaces within the sentence and then echo's out "The Number Of Spaces In The Sentence is 4" as a example Thanks Danielle (12 Replies)
Discussion started by: charlie101208
12 Replies

5. UNIX for Dummies Questions & Answers

Deleting lines in .txt with nonspecific value

Hello, i am new to the forum and know nothing about programing, Linux or Unix :( hope somebody can help me out. I have a .txt file that i need to delete certain lines from. After searching the forum i noticed that using "sed" was the way to go, so i installed gnuwin32 (i use windows xp... (4 Replies)
Discussion started by: luis3141
4 Replies

6. Shell Programming and Scripting

Deleting pattern without removing line

I am trying to delete a pattern without removing line. I searched a lot in this forum and using those I could come up with sed command but it seems that command does not work. Here's how my file looks like: 1 ./63990 7 1171 ./63990 2 2425 ./63990 9 2539 ./63990 1 3125 ./63990 1 10141... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies

7. Solaris

Something is removing/deleting my wtmpx file?

hi, we have a solaris 10 box that was handled by a different sysadmin before & now it is turned over to us for system administration. our concern is that if we issue the "last" command, it usually says "wtmp begins current day current month date 02:30". just like this "wtmp begins Thu Mar 7... (6 Replies)
Discussion started by: booghaw
6 Replies

8. Shell Programming and Scripting

Removing inline binary data from txt file

I am trying to parse a file but the filehas binary data inline mixed with text fields. I tried the binutils strings function , it get the binary data out but put the char following the binary data in a new line . input file app_id:1936 pgm_num:0 branch:TBNY ord_num:0500012(–QMK) deal_num:0... (12 Replies)
Discussion started by: tasmac
12 Replies

9. Shell Programming and Scripting

Deleting Repeating lines from a txt file via script

Hi, I'm having trouble in achieving the following scenario. There is a txt file with thousands of lines and few lines are repeated, which needs to be removed using a script. File.txt 20140522121432,0,12,ram Loc=India From=ram@xxx.com, To=ravi@yyy.com,, 1 2 3 4 . . 30... (18 Replies)
Discussion started by: Gautham
18 Replies

10. UNIX for Dummies Questions & Answers

Removing PATTERN from txt without removing lines and general text formatting

Hi Everybody! First post! Totally noobie. I'm using the terminal to read a poorly formatted book. The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this. I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies
Data::Stag::Writer(3pm) 				User Contributed Perl Documentation				   Data::Stag::Writer(3pm)

NAME
Data::Stag::Writer - base class for all Writers SYNOPSIS
# Abstract class - do not use directly package MyOutputter; use base qw(Data::Stag::Writer); sub e_foo { my ($self, $foo) = @_; $self->writef("data1: %s ", $foo->get_data1); return; } DESCRIPTION
base mixin class for all writers INHERITANCE
This inherits from L<Data::Stag::BaseHandler> PUBLIC METHODS - new Title: new Args: [fn str], [fh FILEHANDLE] Return: L<Data::Stag::BaseHandler> Example: $w = MyWriter->new(-fh=>$fh); returns the tree that was built from all uncaught events file Title: file Args: filename str Returns: filename str Example: $handler->file("my_output_file.txt"); Setting this will cause all output to be diverted to this file; the file will be overwritten by default. The filehandle will not be opened unless any events are thrown For more fine-grained control, use $handler->fh() fh Title: fh Args: filehandle FH Returns: filehandle FH Example: $handler->fh(*STDOUT); Gets/Sets the output filehandle for the writer safe_fh Title: safe_fh Type: PROTECTED Args: filehandle FH Returns: filehandle FH Example: $handler->fh(*STDOUT); As fh(), but makes sure that the filehandle is initialized You should use this if you are overriding this class write Title: write Type: PROTECTED Args: message str Returns: Example: $self->write($stag->get_blah); writes output to be used by classes that subclass this one writef Title: writef As write, analagous to printf use_color Usage - Returns - Args - perl v5.10.0 2008-12-23 Data::Stag::Writer(3pm)
All times are GMT -4. The time now is 04:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy