Sponsored Content
Top Forums Shell Programming and Scripting Search the last instance of a string in a file Post 302280985 by dinesh1178 on Wednesday 28th of January 2009 01:15:43 AM
Old 01-28-2009
"tac" is not available on HP UX
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

appending string to text file based on search string

Hi, I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that? Please help. Malay (1 Reply)
Discussion started by: malaymaru
1 Replies

2. Shell Programming and Scripting

Deleting a line from a file based on one specific string instance?

Hello! I need to delete one line in a file which matches one very precise instance of a string only. When searching the forum I unfortunately only found a solution which would delete each line on which a particular string occurs. Let's assume I have a file composed of thousands of lines... (4 Replies)
Discussion started by: Black Sun
4 Replies

3. Shell Programming and Scripting

Search for last instance of word in a file

Hi I'm trying to search for the last instance of the word 'cache' in a HTML file that I have downloaded from YouTube. I'm using the following syntax, but an error is thrown when I try it. grep -f "cache" Also I wish to append the above grep command to the below so that the search for cache... (3 Replies)
Discussion started by: colmbell
3 Replies

4. Shell Programming and Scripting

search string in a file and retrieve 10 lines including string line

Hi Guys, I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same. can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies

5. Shell Programming and Scripting

Search text file, then grep next instance of string

I need to be able to search for a beginning line header, then use grep or something else to get the very next instance of a particular string, which will ALWAYS be in "Line5". What I have is some data that appears like this: Line1 Line2 Line3 Line4 Line5 Line6 Line7 Line1 Line2 ...... (4 Replies)
Discussion started by: Akilleez
4 Replies

6. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

7. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

8. Shell Programming and Scripting

Search for / and insert \ for every instance

Hi, I want to do a sed (linux) or the alternative in PHP to insert a backslash in front of every occurrence of every forward slash ex. /archive/data/stanley --> \/archive\/data\/stanley I appreciate it! (4 Replies)
Discussion started by: deadyetagain
4 Replies

9. Shell Programming and Scripting

Search string within a file and list common words from the line having the search string

Hi, Need your help for this scripting issue I have. I am not really good at this, so seeking your help. I have a file looking similar to this: Hello, i am human and name=ABCD. How are you? Hello, i am human and name=PQRS. I am good. Hello, i am human and name=ABCD. Good bye. Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies

10. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
NUKE(8) 						      System Manager's Manual							   NUKE(8)

NAME
nuke - launch nuclear weapons at mapped USENET sites SYNOPSIS
/etc/nuke [-y yield] [-a height] [-hcm] sitename... DESCRIPTION
Nuke employs the `missile coordinate' fields in the USENET map database and Internet connections to a server interfaced with AUTOVON to lob nuclear weapons at other UNIX sites, specified by name. The default warhead is a single 25KT groundburst tac nuke; options support other combinations of warhead size, type and deployment. The -y option specifies a yield. The argument must be a number suffixed by K or M, for kiloton or megaton respectively. Yield arguments above 255M are quietly ignored. The -a option specifies an air-burst height in meters. The -h option specifies thermonuclear (hydrogen) weapons. The -c option specifies cobalt-jacketed warheads for permanent site interdiction. The -m option, useful with multiple-site nuke calls, invokes code which optimizes delivery using MIRVed warheads to minimize launches. In accordance with the normal UNIX design philosophy nuke does not prevent you from nuking yourself. FILES
/usr/lib/maps/* USENET map file database BUGS
If a target site has given only nearest-city coordinates in its map entry, incorrect targeting and significant collateral casualties may result. Heavy use of nuke may cause EMP effects which interfere with Internet service. NOTE
This command is restricted to super-users only. AUTHOR
Eric S. Raymond <esr@thyrsus.com> UNIX
13 October 1991 NUKE(8)
All times are GMT -4. The time now is 04:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy