It works fine except in the particular case of the example. When the hour is "00.0x" it does not work properly.
Any thoughts?
Thanks!
Thats because the leading 0s make it an octal number inside of awk and as you can guess...000543 in octal is 355 in decimal...besides why make it so tedious when a single awk command is enough for this...
How do I trim the leading zeroes, and (+,-) in the currency field ?
I have a text file.
Your bill of +00002780.96 for a/c no. 25287324 is due on 11-06.
Your bill of +00422270.48 for a/c no. 28931373 is due on 11-06.
I want the O/P file to be like.
Your bill of 2780.96 for a/c no. 25287324... (22 Replies)
Hello, I am (trying) to write a script that will check to see how many users are logged on to my machine, and if that number is more than 60 I need to kill off all the oldest sessions that are over 60. So far I have been able to check how many users are on and now I am at the part where I have to... (3 Replies)
Helo ,
I m writing small module of c.on RHEL 4
I have one buffer (for e.g. buffer = "002"
now I want to check whethere buffer contains leading zeroes and if it contains
leading zeroes then I want to remove all leading zeroes
( i.e. if buffer = "002" then I want to make buffer = "2")
how... (1 Reply)
Hi,
I need add leading zeroes to a field in a file based on the character count. The field can be of 1 character to 6 character length. I need to make the field 14bytes.
eg:
8351,20,1
8351,234,6
8351,2,0
8351,1234,2
8351,123456,1
8351,12345,2
This should become.
... (3 Replies)
I have th following file
0000000011
0000000001
0000000231
0000000001
0000000022
noow when i run the following command
sed 's/^0+//g' file name
I receive the same output and the leading zeroes are not removed from the file . Please let me know how to achieve... (4 Replies)
Hi Forum.
I tried searching the forum but couldn't find a solution for my question.
I have the following data and would like to have a sed syntax to remove the leading zeroes from the 2nd field only:
Before:
2010-01-01|123|1|1000|2000|500|1500|600|700... (18 Replies)
Hi,
I have some hundreds/thousands of files named logX.dat, where X can be any integer, and they are sequential, X ranges between 1 and any number:
log1.dat log2.dat log3.dat log6.dat log10.dat ... log6000.dat
I would like to rename them to
scatter_params_0001.dat... (6 Replies)
Hello,
I got a question. I have several csv files with lots of data in it and for the first column i have EAN codes.
The problem that i am facing is that some of these codes have the leading 0 removed so they are 12 or less chars while a EAN code is (always?) 13 chars.
For this i used a... (9 Replies)
The awk below executes and produces the current output. it skips the header in row 1 and prints $4,$5,$6 and then adds the header row back.
The problem is that it keeps the tailing tab and prints it in front of $1. I could add a pipe to remove the tab, but is there a better way to do it with on... (7 Replies)
Discussion started by: cmccabe
7 Replies
LEARN ABOUT SUSE
ssgrep
SSGREP(1) GNOME SSGREP(1)NAME
ssgrep - search spreadsheets for strings
SYNOPSIS
ssgrep [OPTIONS] [FILES]
DESCRIPTION
This manual page briefly documents the ssgrep command.
ssgrep is a command line utility to search for strings in spreadsheets of any format supported by gnumeric.
OPTIONS
This program follows the usual GNU command line syntax, with single letter options starting with a single dash (`-') and longer options
starting with two dashes (`--').
Options controlling input file handling
--recalc
Recalculate all cells
Options controlling patterns and pattern matching
-f, --keyword-file=FILE
The path to a text file containing one key per line
-i, --ignore-case
Ignore differences in letter case
-w, --word-regexp
Match only whole words
-F, --fixed-strings
Pattern is a set of fixed strings
-R, --search-results
Search results of expressions too
-v, --invert-match
Search for cells that do not match
Options controlling output in general
-c, --count
Only print a count of matches per file
-L, --files-without-matches
Print filenames without matches
-l, --files-with-matches
Print filenames with matches
-q, --quiet
Suppress all normal output
-H, --with-filename
Print the filename for each match
-h, --without-filename
Do not print the filename for each match
-n, --print-locus
Print the location of each match
-T, --print-type
Print the location type of each match
Help options
-V, --version
Display ssgrep's version
-?, --help
Display the supported options
--usage
Display a brief usage message
EXAMPLE
To search for the string "SUM" in the file foo.gnumeric :
ssgrep SUM foo.gnumeric
To search for the strings from the file keywords in the spreadsheet foo.xls :
ssgrep --keyword-file=keywords foo.xls
LICENSE
ssgrep is licensed under the terms of the General Public License (GPL), version 2. For information on this license look at the source code
that came with the software or see the GNU project page <http://www.gnu.org>.
COPYRIGHT
The copyright on ssgrep and the gnumeric software and source code is held by the individual authors as is documented in the source code.
AUTHOR
ssgrep's primary author is Jody Goldberg <jody@gnome.org>; ssgrep builds on the gnumeric codebase.
The initial version of this manpage was based on ssindex.1 by J.H.M. Dassen (Ray) <jdassen@debian.org>.
SEE ALSO beagled(1), gnumeric(1), ssconvert(1), ssindex(1)
The Gnumeric Homepage <http://www.gnome.org/projects/gnumeric/>.
The GNOME project page <http://www.gnome.org/>.
gnumeric 2009-02-08 SSGREP(1)