Sponsored Content
Top Forums Shell Programming and Scripting Search the last instance of a string in a file Post 302280984 by dinesh1178 on Wednesday 28th of January 2009 01:14:02 AM
Old 01-28-2009
"rev" reverse the order of characters line-wise
 

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
PTS_APROPOS(1)						       AFS Command Reference						    PTS_APROPOS(1)

NAME
pts_apropos - Displays each help entry containing a keyword string SYNOPSIS
pts apropos -topic <help string> [-help] pts ap -t <help string> [-h] DESCRIPTION
The pts apropos command displays the first line of the online help entry for any pts command that has in its name or short description the string specified by the -topic argument. To display the syntax for a command, use the pts help command. OPTIONS
-topic <help string> Specifies the keyword string to match, in lowercase letters only. If the string is more than a single word, surround it with double quotes ("") or other delimiters. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The first line of a command's online help entry names it and briefly describes its function. This command displays the first line for any pts command in which the string specified by the -topic argument is part of the command name or first line. EXAMPLES
The following command lists all pts commands that include the word "create" in their names or short descriptions: % pts apropos create creategroup: create a new group createuser: create a new user PRIVILEGE REQUIRED
None SEE ALSO
pts(1), pts_help(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 PTS_APROPOS(1)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy