I have a question about changing how parsing occurs currently for us:
input FILE123 Note that some tags may not be in a record, and some tags may repeat in the same record.
I need to covert to the following inline format (limiter doesn't matter, and I can change it should the data include the limiter in other files) and trim it so the tag doesn't appear:
Here is what is used currently (from memory, so the syntax isn't correct but the idea is): where awkfile.awk contains if statements and a printf output statement (again, syntax along with substring numbers are not correct - but the idea is there):
I wanted to see different ideas for two reasons: one to see if this could be more efficient since every tag gets multiple ifs every time, and just to straight up learn something new.
I have a script I use on my web server (Apache2). I am changing to Lighttpd and need to make a few changes.
This is what I use on my apache server
#!/bin/bash
# accepts 3 parameters: <domain name> <user name> <XXXXXXXX>
# domain name is without www (just domain.com)
# username would be... (3 Replies)
Folks,
I have a textfile with the config of my router. Part of that config looks like this:
router config
...
ip access-list extended MyAccessList
remark this is my security rule
permit host 10.0.0.1 any
deny host 10.0.0.2 any
...
ip access-list extended YourAccessList
... (25 Replies)
Hi,
I am a newbie to unix/shell scripting and i have a question on how to parse a txt file using perl in a sh script. I have a txt file that contains hundreds of lines with data like this....
X, Y, Latitude, Longitude
1, 142, -38.000000, -91.000000, 26.348
2, 142, 60.000000, -90.000000,... (2 Replies)
All,
I have a shell script which parses the /var/adm/messages file for errors every 15 minutes as a cron job. The script runs at 01, 16, 31, and 46 minutes every hour. The problem is if the error is encountered any time during the beginning of hour I can get paged three times. I would like to... (2 Replies)
Hi,
I have 4000 list files and 4000 sequence data files. Each list file contains a number of 'headers' and data file contains 'header and data'. I would like to extract data from the data file using the list file and write into a new file. As each of the files are quite large, an efficient piece... (6 Replies)
Hi Friends,
I have a requirement to parse a properties file having a key=value pairs.
i need to count the number of key value pairs in the properties file and iterate through each key-value pair. I have written the script to read the number of lines from the property file, but cannot... (2 Replies)
Hi experts ,
I am trying to get the below output:
file :
0/6/4/1 0x0019503C2E26 5 UP lan5 snap5 1 ETHER Yes 224
0/6/4/0 0x0019503C2E25 6 UP lan6 snap6 2 ETHER Yes 224
0/2/1/0 0x0019503E6900 0 UP lan0 snap0 3 ETHER Yes 224... (8 Replies)
I am using Internet Explorer v10 at work and regularly need to import my personal Firefox bookmarks over. Long story short, I have found the import falling over on any bookmark elements which are over 256 characters.
The bookmark file contains bookmarks of this format:
<DT><A... (4 Replies)
Hi all, I need help for a script that pulls out a series of numbers from a file (attached file) Basically I need a parse to write me in a variable: 9d424312 Can someone help me? Thank you (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi all, I need help for a script that pulls out a series of numbers from a file (attached file) Basically I... (1 Reply)
Discussion started by: gianvitolinuxs
1 Replies
LEARN ABOUT XFREE86
od
OD(1) User Commands OD(1)NAME
od - dump files in octal and other formats
SYNOPSIS
od [OPTION]... [FILE]...
od [-abcdfilosx]... [FILE] [[+]OFFSET[.][b]]
od --traditional [OPTION]... [FILE] [[+]OFFSET[.][b] [+][LABEL][.][b]]
DESCRIPTION
Write an unambiguous representation, octal bytes by default, of FILE to standard output. With more than one FILE argument, concatenate
them in the listed order to form the input.
With no FILE, or when FILE is -, read standard input.
If first and second call formats both apply, the second format is assumed if the last operand begins with + or (if there are 2 operands) a
digit. An OFFSET operand means -j OFFSET. LABEL is the pseudo-address at first byte printed, incremented when dump is progressing. For
OFFSET and LABEL, a 0x or 0X prefix indicates hexadecimal; suffixes may be . for octal and b for multiply by 512.
Mandatory arguments to long options are mandatory for short options too.
-A, --address-radix=RADIX
output format for file offsets; RADIX is one of [doxn], for Decimal, Octal, Hex or None
--endian={big|little}
swap input bytes according the specified order
-j, --skip-bytes=BYTES
skip BYTES input bytes first
-N, --read-bytes=BYTES
limit dump to BYTES input bytes
-S BYTES, --strings[=BYTES]
output strings of at least BYTES graphic chars; 3 is implied when BYTES is not specified
-t, --format=TYPE
select output format or formats
-v, --output-duplicates
do not use * to mark line suppression
-w[BYTES], --width[=BYTES]
output BYTES bytes per output line; 32 is implied when BYTES is not specified
--traditional
accept arguments in third form above
--help display this help and exit
--version
output version information and exit
Traditional format specifications may be intermixed; they accumulate:
-a same as -t a, select named characters, ignoring high-order bit
-b same as -t o1, select octal bytes
-c same as -t c, select printable characters or backslash escapes
-d same as -t u2, select unsigned decimal 2-byte units
-f same as -t fF, select floats
-i same as -t dI, select decimal ints
-l same as -t dL, select decimal longs
-o same as -t o2, select octal 2-byte units
-s same as -t d2, select decimal 2-byte units
-x same as -t x2, select hexadecimal 2-byte units
TYPE is made up of one or more of these specifications:
a named character, ignoring high-order bit
c printable character or backslash escape
d[SIZE]
signed decimal, SIZE bytes per integer
f[SIZE]
floating point, SIZE bytes per float
o[SIZE]
octal, SIZE bytes per integer
u[SIZE]
unsigned decimal, SIZE bytes per integer
x[SIZE]
hexadecimal, SIZE bytes per integer
SIZE is a number. For TYPE in [doux], SIZE may also be C for sizeof(char), S for sizeof(short), I for sizeof(int) or L for sizeof(long).
If TYPE is f, SIZE may also be F for sizeof(float), D for sizeof(double) or L for sizeof(long double).
Adding a z suffix to any type displays printable characters at the end of each output line.
BYTES is hex with 0x or 0X prefix, and may have a multiplier suffix:
b 512
KB 1000
K 1024
MB 1000*1000
M 1024*1024
and so on for G, T, P, E, Z, Y.
EXAMPLES
od -A x -t x1z -v
Display hexdump format output
od -A o -t oS -w16
The default output format used by od
AUTHOR
Written by Jim Meyering.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report od translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
Full documentation at: <http://www.gnu.org/software/coreutils/od>
or available locally via: info '(coreutils) od invocation'
GNU coreutils 8.28 January 2018 OD(1)