11-13-2009
Shell Script Needed to Read a text from a list files
Hi,
Below is my issue which I desperately need and I want a shell script which can do this job.
I need this script as I m planning to put this for a system health check. Please assist me.
1. There are 10 log files in a particular location.
2. open each log file. Goto to the end of the file. From the end go up to find a particular text. From this particular text till the end of the log search for another particular text.
3. if the particular text exists in the file return the file name(s) as the output.
Please help me with the script. Thanks a lot to all.
Thanks and Regards
Shriram
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Discussion started by: fxvisions
5 Replies
2. Shell Programming and Scripting
Hi All,
I am writing a shell script to print all the files in a particular folder.
This script is on solaris server .
I am using the lp command to send the requests .
lp -d printername filename .
The output I get is the request id.
Is there any way I can use the request Id to determine if... (1 Reply)
Discussion started by: shahshilpa
1 Replies
3. Shell Programming and Scripting
Hi,
Iam in a need for a script/function in KSH where I want to read a text file (property file) in block by block. Here is the example:
Heading Name Descripton
Block Block1 Value1 Description
Property Name Value
Property Name Value
Property Name Value
Property Name Value
Property Name... (7 Replies)
Discussion started by: ysreenivas
7 Replies
4. Shell Programming and Scripting
I am having one text file and i need to read that data from my shell script.
I will expain you the scenario:
Script look like:
For name type 1:
For age type 2:
For Salary type3:
echo "Enter the input:"
read the data
if input is 1 then go to the Text file and print the... (2 Replies)
Discussion started by: dineshmurs
2 Replies
5. Shell Programming and Scripting
Folks i have written two scripts that do reading of csv files , i am currently fetching the all part of the line in to variables and braking the line into several variables.
I am doing the same thing in an another shell script, i want to integrate both the scripts in to a single one where i can... (2 Replies)
Discussion started by: venu
2 Replies
6. Shell Programming and Scripting
Hi, iam new to unix scripting need a help.
The scenario is i have 2 text files.
a.txt has
colA colB colC colD
JKU1270A JKU1042A 9 1
JKU1270A JKU1042B 9 1
JKU1270A JKU1042C 9 1
JKU1270B JKU1107B 9 1
JKU1270B JKU1107C 9 1... (1 Reply)
Discussion started by: tech_frk
1 Replies
7. Shell Programming and Scripting
Hi ...programmers...
I need a shell script to perform some specific task..
my txt file looks like this
netcdf new {
dimensions:
XAX1_11 = 11 ;
variables:
double XAX1_11(XAX1_11) ;
XAX1_11:point_spacing = "even" ;
XAX1_11:axis = "X" ;
float DEPTH(XAX1_11) ;... (19 Replies)
Discussion started by: Akshay Hegde
19 Replies
8. UNIX for Dummies Questions & Answers
sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies
9. Shell Programming and Scripting
Hi,
I had generated a report in my tool as followsoutput.txt
43.35
9
i needed the script to generate a new file like below
i want to append the text to each of these lines of my filenewoutputfile.txt should be
Total Amount : 43.35
Record Count:9
Regards,
Vasa Saikumar.
... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I need shell script to compare the two files based on certain fields and output should contains the required fields based on result.pls find sample input files and required output
file 1
COUNT, BNG_IP,PORT,OVLAN
22 , 10.238.60.129,1/1,2009
144 , 10.238.60.129,1/1,2251
... (5 Replies)
Discussion started by: surender reddy
5 Replies