Sponsored Content
Top Forums Shell Programming and Scripting Scripting Question - getting lines above ane below certain enteries Post 302845027 by mnassiri on Tuesday 20th of August 2013 03:04:09 PM
Old 08-20-2013
Scripting Question - getting lines above ane below certain enteries

Hello -
I have a file in the followig format

Code:
LINE TEXT 1
Line TEXT 2
TIMESTARTED=Fri Aug 16 15:20:23 EDT 2013
START-OF-DATA
123
123444
23232323
END-OF-DATA
Line TEXT 9

I need to get all the lines between the Start of Data and End of Data and pipe it to a file so output should be

Code:
123
12344
2332323


Can you please recommed a command line option that could work
maybe using Awk Sed Grep ?

Thanks

Last edited by Scrutinizer; 08-20-2013 at 04:12 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

another scripting question

I am writing a script that will identify the oldest file in a directory. Here's the syntax: #!/bin/ksh cd directory chmod 777 * ls -r -1t > file1 sed -n -e "1P" < file1 > file2 So my problem is, now I have file2, which contains the name of the oldest file in the directory. How do I use,... (1 Reply)
Discussion started by: kristy
1 Replies

2. Shell Programming and Scripting

scripting question

I'm new to shell scripting and am having a problem trying to do something in C shell. I want to write a script that will input something instead of a user doing it. For example, using the command 'write' the user is supposed to type something to be sent to another user. I want a script to be able... (3 Replies)
Discussion started by: batmike
3 Replies

3. Shell Programming and Scripting

No. of lines in a file (For scripting)

I'm trying to get the number of lines in a file. I know their are a number of ways of doing this like wc -l or nl which lists the file with the line number. The problem is that I want to use the number of lines a certain program has as a variable in my script. So i can't use wc -l as it returns the... (2 Replies)
Discussion started by: Quesa
2 Replies

4. Shell Programming and Scripting

Scripting question

Folks; I'm writing a shell script to extract some fields out of a log file & it will run periodically, how can i make it runs starting from where it left of. for example; if the script will do the extract every 2 days, let's say the first run will extract fields until July 25, 2007 @ 11:15:22... (1 Reply)
Discussion started by: moe2266
1 Replies

5. UNIX for Advanced & Expert Users

LOST my crontab enteries of root

Hello All, I did very stupid mistake and lost all my crontab enteries on root prompt. Please help me to solve this issue. i did entry on root prompt like this. crontab /home/back.cron and enters but when i enter crontab -l so its only showing 1 entry defined in back.cron and all... (2 Replies)
Discussion started by: wakhan
2 Replies

6. UNIX for Dummies Questions & Answers

Scripting question

folks; I have a script to remove any files that older than 14 days then move any files that younger than 7 days to another directory. but for some reason it doesn't move the files, when i do it manually it works but not through the script. i tried 2 different ways in writing the move part but it... (6 Replies)
Discussion started by: Katkota
6 Replies

7. Solaris

vfstab enteries automatically added during live upgrade

i am trying to patch a solaris 10 server using live upgrade. issue is, when i create a new BE and activate it during reboot the file system that are mounted but doesnt have an entry in vfstab are automatically added in vfstab of new BE. looks like live upgrade uses df -h output as reference... (0 Replies)
Discussion started by: chidori
0 Replies

8. Shell Programming and Scripting

Scripting question

Preview of command prompt f ---> to start ferret q----> to stop ferret asp@nex:~$ f NOAA/PMEL TMAP FERRET v6.82 Linux 2.6.18-308.8.2.el5PAE 32-bit - 08/03/12 3-Dec-12 16:44 yes? go my.jnl yes?column=4/skip=1/type=num,text ............filename.txt ---... (4 Replies)
Discussion started by: nex_asp
4 Replies

9. Shell Programming and Scripting

Scripting question

Hi I am trying to write a small script which takes one by one file name from a txt file and do a 'll' and need to check if equal to the given month, otherwise it should return back the file name. Note: the file name contains parameter. My code is given below: It is not working .. giving error... (6 Replies)
Discussion started by: Ravindra Swan
6 Replies

10. Shell Programming and Scripting

Flag duplicate enteries

Morning Unix Guru's, I have written a script which output the contents of a DB. No the DB is not clever to check this or flag and there is no command for the tool to flag this, which human intervention. But i need to check to see if there are duplicate enteries in the file output and flag... (5 Replies)
Discussion started by: Junes
5 Replies
DROP TEXT SEARCH 
PARSER(7) PostgreSQL 9.2.7 Documentation DROP TEXT SEARCH PARSER(7) NAME
DROP_TEXT_SEARCH_PARSER - remove a text search parser SYNOPSIS
DROP TEXT SEARCH PARSER [ IF EXISTS ] name [ CASCADE | RESTRICT ] DESCRIPTION
DROP TEXT SEARCH PARSER drops an existing text search parser. You must be a superuser to use this command. PARAMETERS
IF EXISTS Do not throw an error if the text search parser does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of an existing text search parser. CASCADE Automatically drop objects that depend on the text search parser. RESTRICT Refuse to drop the text search parser if any objects depend on it. This is the default. EXAMPLES
Remove the text search parser my_parser: DROP TEXT SEARCH PARSER my_parser; This command will not succeed if there are any existing text search configurations that use the parser. Add CASCADE to drop such configurations along with the parser. COMPATIBILITY
There is no DROP TEXT SEARCH PARSER statement in the SQL standard. SEE ALSO
ALTER TEXT SEARCH PARSER (ALTER_TEXT_SEARCH_PARSER(7)), CREATE TEXT SEARCH PARSER (CREATE_TEXT_SEARCH_PARSER(7)) PostgreSQL 9.2.7 2014-02-17 DROP TEXT SEARCH PARSER(7)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy