Sponsored Content
Top Forums Shell Programming and Scripting Help required in searching of pattern. Post 302886599 by learnbash on Sunday 2nd of February 2014 10:31:55 AM
Old 02-02-2014
Hello,

I clearly mentioned in my thread i need to change the text in file and wants to increment the serial number.



Quote:
Originally Posted by Akshay Hegde
I really didn't understand your requirement,





Please explain us clearly..

@ Don Cragun :
you might remember we have seen same kind of issue in last post also.. he didn't tell us clearly what is need to be done.



Changes of text in a file | Unix Linux Forums | Shell Programming and Scripting
Moderator's Comments:
Mod Comment OK. Let's be perfectly clear here. There is absolutely no mention of a serial number in the first 9 posts in this thread.

You had an earlier thread: Changes of text in a file where you did show that you wanted to change the serial number (but didn't say what you wanted done other than to turn some input into a different output without mentioning that you wanted to increment the serial number by name until the 6th post in that thread.

Several questions were asked about what you were trying to do and for a clear description of your requirements. It appears that instead of answering those questions, you decided to start a new thread (with similar vague requirements) and then complain when people trying to help you resolve the issues you raised in this thread didn't also fix the problems you raised in your previous thread.

You appear to be using the UNIX & Linux Forum as a free programming service rather than as a tool to help you learn how to help you learn how to write programs on your own.

In the future, when you have a problem to solve, please provide a clear and complete description (in English) of the requirements for the software you are trying to write. Show us a representative sample of the input you will be processing and show us corresponding sample output that would be produced using your description of the processing to be done when applied to that sample input. Show us what you have tried (including any diagnostic messages and output it produces). Show us that you have looked at the appropriate man pages and explain what you weren't able to understand when trying to write code that uses that interface.

When people trying to help you ask questions about your requirements, answer their questions and, if it will help, provide clarifying examples.

Help us help you instead of making us guess at what you want! We will be less frustrated, and you will be MUCH happier with the results you get.

Last edited by Don Cragun; 02-02-2014 at 05:55 PM.. Reason: Explain reason for infraction and describe what should be done to get maximum benefit from the forum.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regarding Searching Pattern

Hi Guys, Can you help with the shell script: I would like to search a fixed width pattern from a file say for each line from a fixed position and lenght it has to return all rows from the file. Example: To search the third column for "def" it has to return 1 and 4th rows only ... (2 Replies)
Discussion started by: sbasetty
2 Replies

2. Shell Programming and Scripting

Pattern searching pattern in c files

I have a problem in searching a specific pattern in c files. My requirement: I have to find all the division operator in all cfiles. The problem is, the multi line comments and single line comments will also have forward slash in it. Even after avoiding these comments also, if both... (6 Replies)
Discussion started by: murthybptl
6 Replies

3. Shell Programming and Scripting

searching for a pattern

can anybode tell me ? I want to search for a pattern present in a whole directory and subdirectories's files containg " crat" I tried grep -r "crat" */* ; is it right ? (3 Replies)
Discussion started by: pranabrana
3 Replies

4. Shell Programming and Scripting

Searching a pattern in file and deleting th ewhole line containing the pattern

Hi All, Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern. #!bin/sh # The pattern that user want to add to the files echo "Enter the pattern of the redirect" read value # check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies

5. Shell Programming and Scripting

Searching using awk - Help required

Hi... I am working on script to search some records in a file based on certain fields and each record is a ASCII fixed size. I was using awk to search based on certain condition. But the length of the record is too much that awk is giving syntax error near unexpected token `(' Request... (5 Replies)
Discussion started by: ysrikanth
5 Replies

6. Shell Programming and Scripting

Find required files by pattern in xml files and the change the pattern on Linux

Hello, I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found. For instance. I can start the script with arguments for keyword and for value, i.e script.sh keyword... (1 Reply)
Discussion started by: yart
1 Replies

7. UNIX for Dummies Questions & Answers

Pattern searching

Hi, I need small help from you people. In a directory there are around 150 odd files and few them contain the word "TRACK" and few are not. How can I find out the the list of those files which doesn't contain the word "TRACK"? Thanks, Siba (4 Replies)
Discussion started by: siba.s.nayak
4 Replies

8. UNIX for Dummies Questions & Answers

searching pattern in VI

in my file i have somthing likre kpk_12 kpk_1 kpk_1.tcl kpk_3.tcl kpk kpk kpk i want search only kpk i am using this cmd /kpk ...results it is showing all . any cmd is ther other then this to search exactword in this example kpk it shoulsnot show kpk_* etc Thanks in Advance ... (2 Replies)
Discussion started by: prakumar
2 Replies

9. Shell Programming and Scripting

Searching for a pattern and extracting records related to that pattern

Hi there, Looking forward to your advice for the below: I have a file which contains 2 paragraphs related to a particular pattern. I have to search for those paragraphs from a log file and then print a particular line from those paragraphs. Sample: I have one file with the fixed... (3 Replies)
Discussion started by: danish0909
3 Replies

10. Shell Programming and Scripting

Searching and printing only required pattern

Hi all, i am trying to count the number of logical processors from the below output: # print_manifest | grep "logical processors" 8 cores, 16 logical processors per socket 2 logical processors (2 per socket) i just want to have below output : 16 2 also... (11 Replies)
Discussion started by: omkar.jadhav
11 Replies
All times are GMT -4. The time now is 07:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy