Read specific line

Dear All,
I have a one input file following way:
PATH: Top/Science/Earth Sciences/Atmospheric Chemistry
RAW: Atmospheric Chemistry
WSDA: Atmospheric() chemistry(70995,WordNet_2.1:n#06005460)
PATH: Top/Science/Earth Sciences/Atmospheric Chemistry/Publication
RAW: publication
WSDA: publication(41740,WordNet_2.1:n#01087739)
PATH: Top/Science/Earth Sciences/Atmospheric Chemistry/Modeling
RAW: Modeling
WSDA: Modeling(42261,WordNet_2.1:n#00885978)
I want to read a specific line RAW and store each line in the array list. Could you please give me some suggestions. How to read specific line . I know how to read file and line but I do not know the specific line. .
Thanks a lots .
morshed

what I wrote you before , It was my file structure of text file.
My problem is how can I store the token from perticular line .
suppose my perticular line is RAW
i want to store the token following:
ArrayList ar =new ArrayList()
ar.add(Atmospheric Chemistry)
ar.add(publication)
ar.add(modelling)
But I am facing problem to read a specific line like RAW: Atomospheric Chemistry .
I want to ignore line PATH and WASD etc. if you know it please let me know.
thanks ..
morshed

Similar Messages

  • Having trouble reading specific lines from a text file and displaying them in a listbox

    I am trying to read specific lines from all of the text files in a folder that are reports. When I run the application I get the information from the first text file and then it returns this error: "A first chance exception of type 'System.ArgumentOutOfRangeException'
    occurred in mscorlib.dll"
    Below is the code from that form. 
    Option Strict On
    Option Infer Off
    Option Explicit On
    Public Class frmInventoryReport
    Public Function ReadLine(ByVal lineNumber As Integer, ByVal lines As List(Of String)) As String
    Dim intTemp As Integer
    intTemp = lineNumber
    Return lines(lineNumber - 1)
    lineNumber = intTemp
    End Function
    Public Function FileMatches(ByVal folderPath As String, ByVal filePattern As String, ByVal phrase As String) As Boolean
    For Each fileName As String In IO.Directory.GetFiles(folderPath, filePattern)
    If fileName.ToLower().Contains(phrase.ToLower()) Then
    Return True
    End If
    Next
    Return False
    End Function
    Private Sub frmInventoryReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    End Class
    Sorry I'm just beginning coding and I'm still a noob. Any help is appreciated. Thank you!

    Ok, so if I'm following this correctly you should be able to just loop through all of the files in that folder whose file name matches the pattern and then read the first 22 lines, recording only the first and the last.
    Exactly how you store the animal data probably depends on how you are going to display it and what else you are going to do with it.  Is there anything other than name and cage number that should be associated with each animal?
    You might want to make a dataset with a datatable to describe the animal, or you might write a class, or you might just use something generic like a Tuple.  Here's a simple class example:
    Public Class Animal
    Public Property Name As String
    Public Property Cage As String
    Public Overrides Function ToString() As String
    Return String.Format("{0} - {1}", Name, Cage)
    End Function
    End Class
    With that you can use a routine like the following to loop through all of the files and read each one:
    Dim animals As New List(Of Animal)
    Dim folderPath As String = "E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\"
    For Each filePath As String In System.IO.Directory.GetFiles(folderPath, "Report Q?.txt")
    Using reader As New System.IO.StreamReader(filePath)
    Dim lineIndex As Integer = 0
    Dim currentAnimal As New Animal
    While Not reader.EndOfStream
    Dim line As String = reader.ReadLine
    If lineIndex = 0 Then
    currentAnimal.Name = line
    ElseIf lineIndex = 22 Then
    currentAnimal.Cage = line
    Exit While
    End If
    lineIndex += 1
    End While
    animals.Add(currentAnimal)
    End Using
    Next
    'do something to display the animals list
    Then you might bind the animals list to a ListBox, or loop through the list and populate a ListView.  If you decided to fill a datatable instead of making Animal instances, then you might bind the resulting table to a DataGridView.
    There are lots of options depending on what you want and what all you need to do.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • How to read specific line in a file through UNIX shell script..

    Dear Friends,
    I have generated .ldt file under admin/import/US folder through FND_LOAD script for Download the responsibility.
    I registred Shell script (Host concurrent program) in Oracle apps. Now i want to read the file in speciific line which i was generated in admin/import/US folder through unix shell script. Please help me how to read specific line and the i want to replace that which i am going to read the specific line.
    Thanks in advance..
    Regards,
    Velu.

    Hi,
    Thanks for reply,
    My requirement i have to find the specific line in a file and find and replace needed word over there it's should happen programatically. i want to read specific line in a file Once complete find and replace the condition should exists. The loop will go to next file and read the same line in next file also do the same process upto how many files over there.i am doing through UNIX shell script. Please help me out to find the
    Your suggestion is highly appriciated.
    Thanks,
    Velu.

  • Reading specific lines in a file

    hI
    i need to write a program which has a file name a.txt the contents in the file is
    SELECT DISTINCT D.MENUNAME, D.MENULABEL, D.MENUSEP, D.MENUORDER FROM PSMENUDEFN D, PSAUTHITEM A, PSOPRCLS C WHERE D.INSTALLED = 1 AND D.MENUGROUP = :1** AND D.MENUNAME = A.MENUNAME AND A.AUTHORIZEDACTIONS > 0 AND A.CLASSID = C.OPRCLASS AND C.OPRID = :2** ORDER BY D.MENUORDER, D.MENUNAME
    Bind-1 length=21 value=&Administer Workforce
    Bind-2 length=6 value=NLWAJP
    I need to read the file in such a way that in the SQL statement in the place of ":1" I need to get Bind-1 value i.e., &Administer Workforce and same with :2 I need to get Bind 2 value NLWAJP
    Output must be like this
    SELECT DISTINCT D.MENUNAME, D.MENULABEL, D.MENUSEP, D.MENUORDER FROM PSMENUDEFN D, PSAUTHITEM A, PSOPRCLS C WHERE D.INSTALLED = 1 AND D.MENUGROUP = &Adminster Workforce AND D.MENUNAME = A.MENUNAME AND A.AUTHORIZEDACTIONS > 0 AND A.CLASSID = C.OPRCLASS AND C.OPRID = NLWAJP ORDER BY D.MENUORDER, D.MENUNAME

    thomas.behr wrote:
    Read in your text file line by line, then replace \*XXX\*:Y** with the appropriate value using regular expressions.
    Phani532 wrote:The above answers doesnot answer my question....
    I am putting my question in refined format...Wrong. import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.StringReader;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.regex.Pattern;
    import java.util.regex.Matcher;
    public class Test {
      private static final String DEFAULT_TEXT =
      "SELECT DISTINCT D.MENUNAME, D.MENULABEL, D.MENUSEP, D.MENUORDER FROM PSMENUDEFN D, PSAUTHITEM A, PSOPRCLS C WHERE D.INSTALLED = 1 AND *D.MENUGROUP = *:1** AND D.MENUNAME = A.MENUNAME AND A.AUTHORIZEDACTIONS > 0 AND A.CLASSID = C.OPRCLASS AND *C.OPRID = *:2** ORDER BY D.MENUORDER, D.MENUNAME\n" +
      "Bind-1 length=21 value=&Administer Workforce\n" +
      "Bind-2 length=6 value=NLWAJP";
      public static void main( String[] args ) {
        final List<String> lines = new ArrayList<String>();
        try {
          BufferedReader br = null;
          try {
            br = new BufferedReader(new StringReader(DEFAULT_TEXT));
            String line;
            while ((line = br.readLine()) != null) {
              lines.add(line);
          } finally {
            if (br != null) {
              br.close();
        } catch (IOException ioe) {
          lines.clear();
          ioe.printStackTrace();
        if (!lines.isEmpty()) {
          Collections.sort(lines, new Comparator<String>() {
            public int compare( final String s1, final String s2 ) {
              if (s1.startsWith("Bind-")) {
                if (s2.startsWith("Bind-")) {
                  return s1.compareTo(s2);
                } else {
                  return -1;
              } else {
                if (s2.startsWith("Bind-")) {
                  return 1;
                } else {
                  return s1.compareTo(s2);
          final Map<String, String> parameters = new HashMap<String, String>();
          for (String line : lines) {
            if (line.startsWith("Bind-")) {
              parameters.put(line.substring(5, line.indexOf(' ')), line.substring(line.indexOf("value=") + 6));
            } else if (line.startsWith("SELECT ")) {
              final Matcher matcher = Pattern.compile("\\*(.*?)\\*:([\\d]*?)\\*\\*").matcher(line);
              final StringBuilder sb = new StringBuilder();
              int last = 0;
              while (matcher.find()) {
                final int idx = matcher.start();
                if (idx > last) {
                  sb.append(line.substring(last, idx));
                sb.append(matcher.group(1));
                sb.append(parameters.get(matcher.group(2)));
                last = matcher.end();
              if (last < line.length()) {
                sb.append(line.substring(last));
              System.out.println(sb.toString());
    }(Lucky you, I'm feeling generous - and eager to code.)

  • How to read specific lines from a text file using external table or any other method?

    Hi,
    I have a text file with delimited data, I have to pick only odd number rows and load into a table...
    Ex:
    row1:  1,2,2,3,3,34,4,4,4,5,5,5,,,5  ( have to load only this row)
    row2:   8,9,878,78,657,575,7,5,,,7,7
    Hope this is enough..
    I am using Oracle 11.2.0 version...
    Thanks

    There are various ways to do this.  I would be inclined to use SQL*Loader.  That way you can load it from the client or the server and you can use a SQL*Loader sequence to preserve the row order in the text file.  I would load the whole row as a varray into a staging table, then use the TABLE and MOD functions to load the individual numbers from only the odd rows.  Please see the demonstration below.
    SCOTT@orcl12c> HOST TYPE text_file.csv
    1,2,2,3,3,34,4,4,4,5,5,5,,,5
    8,9,878,78,657,575,7,5,,,7,7
    101,201
    102,202
    SCOTT@orcl12c> HOST TYPE test.ctl
    LOAD DATA
    INFILE text_file.csv
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (whole_row VARRAY TERMINATED BY '/n' (x INTEGER EXTERNAL),
    rn SEQUENCE)
    SCOTT@orcl12c> CREATE TABLE staging
      2    (rn         NUMBER,
      3     whole_row  SYS.OdciNumberList)
      4  /
    Table created.
    SCOTT@orcl12c> HOST SQLLDR scott/tiger CONTROL=test.ctl LOG=test.log
    SQL*Loader: Release 12.1.0.1.0 - Production on Tue Aug 27 13:48:37 2013
    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
    Path used:      Conventional
    Commit point reached - logical record count 4
    Table STAGING:
      4 Rows successfully loaded.
    Check the log file:
      test.log
    for more information about the load.
    SCOTT@orcl12c> CREATE TABLE a_table
      2    (rn       NUMBER,
      3     data  NUMBER)
      4  /
    Table created.
    SCOTT@orcl12c> INSERT INTO a_table (rn, data)
      2  SELECT s.rn,
      3         t.COLUMN_VALUE data
      4  FROM   staging s,
      5         TABLE (s.whole_row) t
      6  WHERE  MOD (rn, 2) != 0
      7  /
    17 rows created.
    SCOTT@orcl12c> SELECT * FROM a_table
      2  /
            RN       DATA
             1          1
             1          2
             1          2
             1          3
             1          3
             1         34
             1          4
             1          4
             1          4
             1          5
             1          5
             1          5
             1
             1
             1          5
             3        101
             3        201
    17 rows selected.

  • How to read random lines?

    Hi everyone,
    I am trying to write a program that will take a random lines from a number text files and copy them to a new document.
    Is there a way to read specific lines in a document?
    For example if I set an int array to hold 20 random numbers, (23, 504, 498, etc...)
    can i then jump to each of these lines in the document and output the data on each line??
    I have tried the RandomAccessFile seek method but that only moves a certain number of bytes(not lines).
    I have also tried:
    String tempLine = null;
    // where numLines is the total number of lines in the document
    // where randInput is my RandomAccessFile
    For (int i = 0; i < numLines; i++)
    tempLine = (randInput.readLine())
    for(int k = 0; k < 20; k++)
    if(i == randNums[k])
    out.println(tempLine);
    but this method is too slow, as some of my input files are over 500,000 lines in length.
    Can anyone please suggest a faster more efficient method??
    Many Thanks

    If that is really the requirement then I suggest you
    pre-process the file into some other form so it is
    easier to fulfil the requirement.
    For example you could copy the lines into a database
    table, then choose random records from the table. Or
    you could copy the lines into a new file where all
    the lines had the same length (pad with blanks or
    nulls or whatever you need to get back the original
    line), which would make it possible to seek to line N.How about cache first the file, by reading the each line in the file and store that line in an array?
    ie.
    package com.yahoo.ronilloang.idunoifthisright;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.OutputStreamWriter;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.Locale;
    import java.util.Vector;
    * How about caching first then randomly read? This maybe slow or definitely slow in performance.
    * @author     Ronillo Ang
    public class CacheFirstThenRandomlyPick{
         private String[] lines;
         private int lineCount;
         public CacheFirstThenRandomlyPick(String fileName) throws IOException{
              File file = new File(fileName);
              if(file.exists()){
                   BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
                   String line = bufferedReader.readLine();
                   while(line != null){
                        addLine(line);
                        line = bufferedReader.readLine();
                   trim();
                   randomlyPickAndWrite();
                   bufferedReader.close();
         private void addLine(String line){
              if(lines == null)
                   lines = new String[10];
              checkAndExpandCapacityAsNeeded(lineCount + 1);
              lines[lineCount++] = line;
         private void checkAndExpandCapacityAsNeeded(int minCapacity){
              int oldCapacity = lines.length;
              if(minCapacity > oldCapacity){
                   int newCapacity = oldCapacity * 2;
                   while(minCapacity >= newCapacity)
                        newCapacity += 10;
                   String[] oldLines = lines;
                   lines = new String[newCapacity];
                   System.arraycopy(oldLines, 0, lines, 0, lineCount);
         private void trim(){
              if(lineCount > 0 && lineCount < lines.length){
                   String[] oldLines = lines;
                   lines = new String[lineCount];
                   System.arraycopy(oldLines, 0, lines, 0, lineCount);
         private void randomlyPickAndWrite() throws IOException{
              Vector drawnNumber = new Vector();
              BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File("out.txt")), "8859_1"));
              for(int index = 0; index < lineCount; ++index){
                   int whatLineToRead = (int)(Math.random() * lineCount);
                   while(drawnNumber.contains(String.valueOf(whatLineToRead)))
                        whatLineToRead = (int)(Math.random() * lineCount);
                   drawnNumber.addElement(String.valueOf(whatLineToRead));
                   bufferedWriter.write(lines[whatLineToRead]);
                   bufferedWriter.newLine();
              bufferedWriter.flush();
              bufferedWriter.close();
         public static void main(String[] args) throws IOException{
              if(args.length == 1){
                   SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss", Locale.getDefault());
                   System.out.println("Program start at " + sdf.format(new Date()));
                   new CacheFirstThenRandomlyPick(args[0]);
                   System.out.println("Program ended at " + sdf.format(new Date()));
              else
                   System.out.println("Usage: java com.yahoo.ronilloang.idunoifthisright.CacheFirstThenRandomlyPick <text file>");
              System.out.println("\ndone.");
    }What do you think? Definitely wrong? Okay. This just what I think. Never mind.
    Thank you. -Ronillo

  • How to read a specific line of a .dat file?

    can we read a specific line of a .dat file, if so, how?
    i have this .dat files for each customer, which contain their name on the first line, their id on the second line
    and a list of items and an item id between each item.
    John Doe
    455689
    milk
    1
    orange
    9
    Here is what I am trying to do, please correct me
    //list out .dat file in dir
    File customer_dir = new File ("Customer")
    if (customer_dir.isDirectory())
    String[] listofdat=dir.list();
    for (int i=0;i<listofdat.length();i++)
    Scanner dat_read = new Scanner (new File listfodat);
    dat_read.nextLine();
    if (dat_read.nextLine().equals("455689")) <--is this okay?

    bibiancheng wrote:
    would you please explain to me what
    String[] tokens = line.trim().split("\\s*,\\s*")"\\s*,\\s*" is a regex where \\s means whitespace and the * means "any number of".
    so \\s* means that it will grab all the whitespace if there is any.
    trim() removes white space from the beginning and end of the string.
    dont put a comma in the name.
    spaces allowed: "jane doe, 12-14-09, 428438, 6, 388473, 7, 187374, 3"
    it was just a recommendation. breaking it into separate lines would be fine.

  • Read a specific line of a txt file using vba not using line by line, Leer una Linea especifica de archivo de texto sin recorrer linea por linea

    Buenos días - Good morning
    Mi pregunta la escribiré en español y en ingles y espero alguien tenga la solución.
    I'll write my question in Spanish and English and I hope someone has the solution.
    SPANISH
    Creé una Macro en VBA que lee mas de 200.000 archivos de texto (.txt) los cuales tienen diferentes tamaños y cantidad de información dentro de ellos, de cada archivo necesito extraer la información de las 3 primeras lineas y las ultimas 10 lineas, las 3
    primeras lineas es fácil ya que uso un "READLINE" 3 veces y voy capturando la información de las tres primeras lineas, para las ultimas 10 lineas las cuales están identificadas por un código inicial hago un ciclo que lee linea por linea hasta que
    encuentra el numero 3 en un espacio especificado de la linea y de ahí captura la información de cada linea de texto que serian las 10 ultimas, el problema que tengo es que la cantidad de archivos y de información dentro de los archivos aumenta considerablemente
    cada día y por tener el ciclo que lee cada una de las lineas de cada archivo de texto la Macro se demora cada vez mas a medida que aumenta la información y consume cada vez mas memoria de la maquina.
    Necesito un método diferente que no lea linea por linea y que yo le pueda decir lea la linea (renglón) numero 1000 (ejemplo) y capture la información a partir de ahí para ahorrar algo de tiempo, o saber cuantas lineas de texto tiene el archivo .txt y decirle
    que me lea a partir de (numero total de lineas del txt -(menos) 10 lineas) así me leería las 10 ultimas.
    ENGLISH
    I created a Macro in VBA that reads more than 200,000 text files (.txt) which have different sizes and quantity of information within them, each file need to extract the information from the first 3 lines and last 10 lines, 3 first lines is easy as using a
    'READLINE "3 times and am capturing information from the first three lines, for the last 10 lines which are identified by an initial code I make a loop that reads line by line until it finds the number 3 in a specified area of ​​the line and then capture
    the information of each line of text that would be 10 last, the problem that I have is that the number of files and information within files significantly increases every day and having the loop that reads each line of each text file is delayed Macro increasingly
    as more information and consume more and more memory on the machine.
    I Need a different method not read line by line and I can tell you read the line (row) number 1000 (example) and capture the information from there to save some time or know how many lines of text have the file .txt and tell me read from (total number of lines
    of txt - (minus) 10 lines) so I would read 10 last.
    Here is the code I currently use
    Dejo el código que uso actualmente
    Dim fs, f, ts, REG
    Set fso = CreateObject("Scripting.FileSystemObject")
        On Error Resume Next
    sFilePath = strFolder & "\" & strFileName
    Set f = fso.getFile(sFilePath)
    Set ts = f.OpenAsTextStream(1, 0)
    REG = ts.READLINE
    Ciclo para llegar hasta las ultimas 10 lineas
    Cycle to reach the last 10 lines
    For J = 1 To 200000
                REG = ts.READLINE
                    If Val(Mid(REG, 6, 1)) = 3 Then

    Good Morning ryguy72
    First thank you so much for your answer, sorry for my english in the question, I tried for a long time to make a code that wasn't so slow to read the last 10 lines, 'cuz most codes used a cycle "For" to read line by line asking if in the specific
    position is the character(number) that tells me that i should get started to read the last lines that i need, that takes a lot longer than your code doing a Split with Mydata and storing it in strData(). I don't know how to do this and every forum that
    i consulted to read the last 10 lines quickly they made the same read line by line with a Cycle "for".
    Thanks again, I gonna improve my code with your help, 'cuz it took about 4 hours to read all the information and everyday ascended more time and memory consumption.
    Thanks to everyone who offered their help so disinterested and free, so should always be people with that spirit, I hope someday to be SO good as you programming.

  • How to read and select only a specific lines from a CSV file. Pls help

    I have a java application to read a CSV file. I've already managed to read them all and output it to System.out.println(). Now the problem is I want to select a specific row of the records. How do I do it? Below is the codes i've typed.
    FileReader fr = new FileReader(fileName);
    BufferedReader inFile = new BufferedReader(fr);
    StringBuffer buf = new StringBuffer();
    String line = null;
    while ((line = inFile.readLine()) != null) {
    buf.append(line);
    buf.append("\n");
    String inString = buf.toString();
    System.out.println(inString);
    This is the record that i want to read. For example, I want to select n print out line "80,2.90,3.00,3.10,3.20,......."
    [Factor1]
    Time [s],0.00,0.10,0.20,0.30,0.40,0.50,0.60,0.70,0.80,0.90,1.00,1.10,1.20,1.30,1.40,1.50,1.60,1.70,1.80,1.90,2.00,2.10,2.20,2.30,2.40,2.50,2.60,2.70,2.80,2.90,3.00,3.10,3.20,3.30,3.40,3.50,3.60,3.70,3.80,3.90,4.00,4.10,4.20,4.30,4.40,4.50,4.60,4.70,4.80,4.90,5.00,5.10,5.20,5.30,5.40,5.50,5.60,5.70,5.80,5.90,6.00,6.10,6.20,6.30,6.40,6.50,6.60,6.70,6.80,6.90,7.00,7.10,7.20,7.30
    Phi-0 [dB],-0.86,-0.80,-0.80,-0.99,-0.56,-0.53,-0.95

    If you know how many bytes each line is, you can use RandomAccessFile to skip directly to the byte position corresponding to your desired line. Otherwise, you'll have to read each line and just ignore the ones you don't want.

  • Read specified line from a text file

    Hi,
    I am trying to read a specific line from a text file. I don't want to read all of it but just this specific line... say line number 2. Is there a method built-in in java or should I code this myself?
    Thanks and regards,
    Krt_Malta

    Krt_malta wrote:
    I am trying to read a specific line from a text file. I don't want to read all of it but just this specific line... say line number 2. Is there a method built-in in java or should I code this myself?Is there anything in your use case that precludes using the offset of the start of the line rather than the line number?

  • Is there a way to specify text-to-speech to dictate a specific line or..

    Hi guys,
    Is there a way to specify text-to-speech to dictate a specific line or page in a pdf file?
    In fact, it would be cool if text-to-speech highlighted each word that is being spoken through out the document during dictation and you could rewind, pause or fastforward the speech in real-time. Is this feature available? if not, can anyone recommend any other programs that can do this?
    thanx in advance

    Is there a way to specify text-to-speech to dictate a specific line or page in a pdf file?
    Yes!
    With fully modern Cocoa applications (like Safari, Preview, TextEdit, and Mail) you can select the line or page and then from the application menu > Services > Speech > Start Speaking Text
    You can also select and then Control-Click on the selection and then pick Speech > Start Speaking Text from the contextual menu. (Works with Safari, TextEdit, and Mail, but not Preview for PDF.)
    In fact, it would be cool if text-to-speech
    highlighted each word that is being spoken through
    out the document during dictation and you could
    rewind, pause or fastforward the speech in real-time.
    That would be cool. Are you looking for an interface enhancement, or would a talking book reader with these features be acceptable?
    Is this feature available?
    No, but you can get somewhat close to this ideal by using VoiceOver and checking Show Caption Panel.
    if not, can anyone recommend any other programs that can do this?
    I have had fair success with the Text Help Read & Write Aloud products.
    http://www.texthelp.com/rwm.asp?q1=products&q2=rwm
    eMac 1.42   Mac OS X (10.4.6)   I paid the going Windows price for a screen reader and got a free computer!

  • How to reverse the AuC Specific Line Item?

    Hi Gurus,
    I am facing one issue while doing the AuC Reverse. Through T.Code -AIST  i had reverse the AuC line item. but i want to reverse the specific line item.E.g. if there are 10 AuC Assets ( No. 1,2,3.....10)for the same date and want to reverse the 4th and 6th AuC asset line item? how can i reverse this?
    Could you please suggest me to overcome this issue?
    Regards,
    Dhananjay R.

    by mistake raise ....

  • Order booking on specific line item

    Can i book a specific line item in a multi line sales order ?

    By the name Order booking suggests, the booking happens at Order level and not at Order Line level.
    regards,

  • SAPScript: How to INTENSITY in a specific line?

    Dears,
    In my forms i need to intensity the specific line of the window.
    Now I knew use
    /: BOX INTENSITY 10
    to intensity the whole window,           But how to intensity a specific line?
    Thanks a lot.
    Sincerely,
    Julie

    Hi,
    write a BOX statement in the SCRIPT at the position where you want to intensify.
    Suppose your window dimentions are
                                 Left margin: 2 CH
                                 Uppar margin: 10 LN
                                 Width      : 60 CH
                                 Height:  20 LN
    and you want to intensify at
                                 Left margin: 2 CH
                                 Uppar margin: 15 LN
                                 Width      : 60 CH
                                  Height:  1 LN
    write the box statement with above dimensions and intensity.
    Regards,
    Sandeep.

  • How to Read specific data from file and do a calculation and display on the output

    FYI: Below is the function use for the writing:
    -OpenFile(use ASCII)
    -sprintf
    -WriteFile
    Example: Output from the doc file
    …EndTime: 09:34:48 program time: 0.567663 sec
    …EndTime: 09:36:48 program time: 0.666666 sec
    My objective is to read data 0.666666 (FYI: is last sentence of the file) to do some calculation. How can we read specific data(specific location) from file..
    Any advice or help?
    What is the function needed?

    I would consider counting line feeds and checking for end-of file to isolate the last line, which then can be read using fscanf...
    Have a look at getc...
    character = fgetc ( stream );
    if ( character == '\n' ) // new line
    if ( character == EOF ) // end-of-file

Maybe you are looking for