Questions tagged [fileparsing]

170 questions
0
votes
2 answers

unable to recognize file type

this is my first post. I'm new in Java. I'm working on file parser. I've tried to identify if it is CSV or another file format, but it looks like it is not quite a standard format. I'm working on apache camel solution (my first and last idea :( ),…
0
votes
2 answers

A rotating log file in perl

I have implemented a log file that will be storing the cpu and memory state of a process after every minute.I have limited the maximum size of the file to 3MB (thats enough for my purpose). The script will be called by a cron job after every minute…
Arunmu
  • 6,837
  • 1
  • 24
  • 46
0
votes
1 answer

Extract list of files lines between pattern in java

I have a file like - -------------- abc efg hig --------------- xyz pqr --------------- fdg gege ger ger --------------- Whats the best way to write java code which parses this file and creates separate List for each of the block of text between…
vivek garg
  • 283
  • 1
  • 2
  • 15
0
votes
1 answer

How to parse Cucumber feature file in java or groovy?

I need to parse .feature files and produce Json data. I am currently able to read the steps using regular expressions, But i want to parse entire feature file. Path path= Paths.get("path to feature file").toAbsolutePath(); try { File…
SivaTeja
  • 378
  • 1
  • 3
  • 16
0
votes
0 answers

Parsing Configuration File To Excel-Like View

I have a firewall configuration file that goes like this: { "javaClass": "some text", "rules": { "javaClass": "java.util.LinkedList", "list": [ { "block": true, "conditions": { …
sikas
  • 5,435
  • 28
  • 75
  • 120
0
votes
3 answers

Parsing file in Powershell

I have the following raw content in a file. I am trying just print the list of all urls. I have kind of wrote some script. Getting content (reading) from the file and using ForEach line in lines - but do not know how to filter just the Url from the…
user1911509
  • 133
  • 4
  • 13
0
votes
2 answers

Parsing Log File - C# or any other

I'm trying to parse a log file containing info like this: 2015-03-08 10:30:01 /user849/connect 2015-03-08 10:30:01 /user262/open-level2-price 2015-03-08 10:30:01 /user839/open-detailed-quotes 2015-03-08 10:30:02 …
Shadi Mahasneh
  • 155
  • 2
  • 11
0
votes
0 answers

Parse a Text File with Multiple Line Comments

I have a file with the following format ----------------------------------- File: test.cs Some Text Here http:\\link Comment #1 Comment #2 Comment #X ----------------------------------- I have the following class: public class…
user2970916
  • 1,146
  • 3
  • 15
  • 37
0
votes
3 answers

Printing out in Python

I'm writing a program in which a user enters sales in a text file, the program reads the file and prints out the total amount for each sales category. Here's an example of a text…
John Walker
  • 53
  • 1
  • 8
0
votes
2 answers

FOR loop to match a name from file then get 4 values from second file

Hi I need some help getting this to work :) I have a file with names in a list. FILE A. SomeNameA SomeNameB SomeNameC etc Now I need to get a set of lines from FILE…
0
votes
1 answer

How to print cloned list once and load them in dictionary in Python?

my input file: cs 124456 powerful cs 124456 powerful me 125454 easy me 125455 easy me 125455 easy ec 125555 done ec 127678 fine ec 127678 fine ci 127678 fine ci 127678 fine eee 125678 good eee 125678 good eee 125678 good eee …
raenish
  • 1
  • 1
0
votes
3 answers

java program to conditionally read lines from file

I'm new to coding in Java. I put together this piece of code to read all lines between the "Start" and "End" tag in the following text file. Start hi hello how are you doing? End My program is as follows.... package test; import java.io.*; public…
MohanVS
  • 167
  • 1
  • 1
  • 10
0
votes
1 answer

Parsing a CSV file using shell scripting

I have been trying to write script which will parse a CSV file and give the output in a specified format. The input file is in the below…
Anirban Roy
  • 111
  • 1
  • 1
  • 9
0
votes
1 answer

How to parse files according to their extension

I've a situation where there are different types of files (of different extension) in some of the directories. I've no idea what type of file is present in a particular directory. Let's assume the following case: There is a common path to all five…
intruder
  • 417
  • 1
  • 3
  • 18
0
votes
2 answers

Python - Help needed with parsing file. Is there a way to ignore EOF chars?

I have a binary file that I am trying to extract strings from and I am having quite the time doing so. :( My current strategy is to read in the file using Python (using one of the following functions: read(), readline(), or readlines()). Next, I…