Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: clemhoff
  • Content: Threads
  • Order by date
  1. clemhoff

    Array printing and if statement

    I'm stuck on a problem of array printing and a "if" condition . I tried different combinations with the 'for' loop but the result always returns empty. Also when I try to include the "else" statement, I invariably get an "illegal instruction" message. Could you help me on this? --- SAMPLE ---...
  2. clemhoff

    List output from HTML pages

    Hello everyone, The extract below is the result of a pipe passed through sed with which I clean white space from HTML pages. /* --- SAMPLE --- */ ... <a href='/books/filebooks_gen_cbooks=41386.html'> <b>L'école de la chair</b></a> (Nikutai No Gakka)<br /> <span class=\"fs11\"> 1963<br />...
  3. clemhoff

    Split File

    Hello All, I would like to split a big "pipe" delimited file in as many files as there are columns. The number of columns being undefined, how to make so that each column header acts as the output file name? Sample IN header1|header2|...|headern 11111|txt1|...|alphanum_n1...
  4. clemhoff

    Insert data with values located n line further

    Hello everyone; I have plenty of very large (>60Mo) pseudo-xml files which looks as follows: <?xml version="1.0" encoding="UTF-8"?> ... more lines here </ObjectStyle> <Object type="Field" flags="67108864" flags="67108864"> <Style>128</Style> <Bounds top=" 24" left="138" bottom=" 38"...
  5. clemhoff

    Append next line

    Hello, I'm trying to append a line to previous if it doesn't begin with a equal sign Input ... =POUILLY SUR VINGEANNE =2006 0628 59.9370-111 25.619 =45370 ... Expected Output: ... =POUILLY SUR VINGEANNE =2006|0628|59.9370-111|25.619 =45370 What I've tried so far: awk '/^=/ {if (line) print...
  6. clemhoff

    Reduce script/calls

    Hi all, Just wondering if there's a way to write the following command in just one awk call: #!/bin/sh ... awk '{printf "%s" (NR%5 ? "\t" : "\n"),$0}' | awk 'BEGIN{OFS="\t"} {print "'"$1"'", "'"$2"'", $2, $1, $3, $4, $5, "'"`date +%d\/%m\/%Y\ %H:%M:%S`"'", ""}' ... stdout= 27/07/07 92410...
  7. clemhoff

    joining lines conditionally

    Hi All, I'm quite new to awk... I did search on this forum but did not find a solution to my problem.. The problem i am having is how to write this in awk (or sed ): - If a line does not end with a parenthese '(', join every following line till one begining with a ')'- ---------- Input ...

Part and Inventory Search

Back
Top