Sponsored Content
Top Forums Shell Programming and Scripting Scripting Question - getting lines above ane below certain enteries Post 302845051 by Jotne on Tuesday 20th of August 2013 04:10:08 PM
Old 08-20-2013
awk
Code:
awk '/START-OF-DATA/{f=1;next} /END-OF-DATA/{f=0} f' file

 

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 
TEMPLATE(7) SQL Commands DROP TEXT SEARCH TEMPLATE(7) NAME
DROP TEXT SEARCH TEMPLATE - remove a text search template SYNOPSIS
DROP TEXT SEARCH TEMPLATE [ IF EXISTS ] name [ CASCADE | RESTRICT ] DESCRIPTION
DROP TEXT SEARCH TEMPLATE drops an existing text search template. You must be a superuser to use this command. PARAMETERS
IF EXISTS Do not throw an error if the text search template does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of an existing text search template. CASCADE Automatically drop objects that depend on the text search template. RESTRICT Refuse to drop the text search template if any objects depend on it. This is the default. EXAMPLES
Remove the text search template thesaurus: DROP TEXT SEARCH TEMPLATE thesaurus; This command will not succeed if there are any existing text search dictionaries that use the template. Add CASCADE to drop such dictionar- ies along with the template. COMPATIBILITY
There is no DROP TEXT SEARCH TEMPLATE statement in the SQL standard. SEE ALSO
ALTER TEXT SEARCH TEMPLATE [alter_text_search_template(7)], CREATE TEXT SEARCH TEMPLATE [create_text_search_template(7)] SQL - Language Statements 2010-05-14 DROP TEXT SEARCH TEMPLATE(7)
All times are GMT -4. The time now is 01:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy