Hi everyone!
I'm not new to Unix, but I've never used awk before.
I tried to look up this information on several sites and forums,
I also looked in the documentation but I haven't found a solution yet.
I would like to print the previous 3 lines before and the following 4 lines after the... (6 Replies)
I am parsing a nagios config, searching for a string, and then printing the line 2 lines later (the "members" string). Here's the data:
define hostgroup{
hostgroup_name chat-dev
alias chat-dev
members thisisahostname
}
define hostgroup{
... (1 Reply)
Hi,
i have an input text file like this:
Student 1
maths
science
=
Student 2
maths
science
=
Student 3
maths
science
i would like to print each student information into separate files, each student id is separated by "=". (1 Reply)
Hi Friends,
I have small issue with following code snippet.
I am trying call one function inside awk in which the function inturn will echo few lines. However when i ran script its throwing an error saying "nawk: syntax error at source line 1".
#!/bin/sh
eval input=$@
while read... (3 Replies)
Hello,
I can extract lines in a file, between two strings but only one time.
If there are multiple occurencies, my command show only one block.
Example, monfichier.txt contains :
debut_sect
texte L1
texte L2
texte L3
texte L4
fin_sect
donnees inutiles 1
donnees inutiles 2
... (8 Replies)
Data:
Pattern Data Data Data
Data Data Data
Data Data Data
...
With awk, how do I print the pattern matching line, then the subsequent lines following the pattern matching line. Varying number of lines following the pattern matching line. (9 Replies)
Hi all,
I am new to using awk and am quickly discovering what a powerful pattern-recognition tool it is. However, I have what seems like a fairly basic task that I just can't figure out how to perform in one line. I want awk to find and print all the lines in which one of multiple patterns (e.g.... (8 Replies)
Hi all,
i need help to extract each first line from multiple lines occurrences based on different patterns (name) starting from the fourth lines like follows:-
// header 1 header 2 header 3
// no acc name score rank
//... (2 Replies)
Hi All,
I have a file looks like:
rst:singh:99.0.20-X86 2 rst:ACSI_SIN_SERVICES
rst:singh:99.0.20-X86 2 rst:ACSI_BISI want to wrap 3rd col in one line and add variable value at start and ending of line and I wrote command:
cat file | awk '{print $3}' | xargs > command.txt
sed -e... (1 Reply)
Hello.
I have been looking high and low for the solution for this. I seems there should be a simple answer, but alas.
I have a big xml file, and I need to extract certain information from specific items. The information I need can be found between a specific set of tags. let's call them... (2 Replies)
Discussion started by: Tobias-Reiper
2 Replies
LEARN ABOUT DEBIAN
xls2csv
xls2csv(1) General Commands Manual xls2csv(1)NAME
xls2csv - reads MS-Excel file and puts its content as comma-separated data on standard output
SYNOPSIS
xls2csv [-xlV] [-f format ] [-b string ] [-s charset ] [-d charset ] [-q number ] [-c char] files
DESCRIPTION
xls2csv reads MS-Excel spreadsheet and dumps its content as comma-separated values to stdout. Numbers are printed without delimiters,
strings are enclosed in the double quotes. Double-quotes inside string are doubled.
OPTIONS -x print unknown Unicode chars as xNNNN, rather than as question marks
-l list known charsets and exit successfully
-cchar cell separator char. By default - comma.
-bstring
sheet break string. This string (by default - formfeed) would be output at the end of each workbook page. This string is printed
after page starting at start of line, but no linefeed would be automatically added at the end of string. Include newline at the ent
of sheet separator if you want it to appear on separate line by itself
-gnumber number of decimal digits in the numbers. By default maximal double precision (system-dependent macro DBL_DIG) is used.
-qnumber
set quote mode. In quote mode 0 cell contents is never quoted. In quote mode 1 only strings which contain spaces, double quotes or
commas are quoted. In quote mode 2 (default) all cells with type string are quoted. In quote mode 3 all cells are quoted.
-dcharset`
- specifies destination charset name. Charset file has format described in CHARACTER SETS section of catdoc(1) manual page. By
default, current locale charset would be used if langinfo support was enabled at the compile time.
-scharset
- specifies source charset. Typically, Excel files have CODE PAGE record, which denotes input charset, but for some reason you may
wish to override it.
-fformat
- specifies date/time format to use for output of all Excel date and time values. If this option is not specified, format, speci-
fied in the spreadsheet is used. On POSIX system any format, allowed by strftime(3) can be used as value of this option. Under MS-
DOS xls2csv implements limited set of strftime formats, namely m, d, y, Y, b, l, p, H, M, S.
-V outputs version number
FILES
${HOME}/.catdocrc, catdoc charset files and substitution map files (see catdoc(1) manual page for details,
SEE ALSO cat(1), catdoc(1), strings(1), utf8(7), unicode(7)AUTHOR
V.B.Wagner <vitus@45.free.net>, based on biffview by David Rysdam
MS-Word reader Version 0.94.4 xls2csv(1)