This expression will extract the date from the field in format YYYYMMDD and it will be converted to integer
i.e. '2017-01-03 13:18:13.667' --> 20170103 (int) Just replace for your field name
#!/bin/sh | |
# | |
# Copyright | |
# | |
# Check for the correct # of arguments: | |
# Use this syntax or use: if [ $# -lt 3 ] | |
echo "$# arguments were supplied." | |
if [ $# -lt 3 ] |
<?xml version=”1.0" encoding=”UTF-8"?> | |
<viewentries timestamp=”20171026T092215,59Z”> | |
<item position=”1" > | |
<entrydata name=”OrderDate”> | |
<datetime dst=”true”>20171026T102513,86+02</datetime></entrydata> | |
<entrydata name=”Country”> | |
<text>Spain</text></entrydata> | |
</item> | |
<item position=”2" > | |
<entrydata name=”OrderDate”> |
. |
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
""" | |
Written on 2012-12-12 by Philipp Klaus <philipp.l.klaus →AT→ web.de>. | |
Check <https://gist.github.com/4271012> for newer versions. | |
Also check <https://gist.github.com/3155743> for a tool to | |
rename JPEGs according to their EXIF shot time. | |
""" |
#!/bin/bash | |
iterations=100000 | |
fileName=myFile.xml | |
# header | |
echo "<?xml version="1.0" encoding="UTF-8"?> | |
<file> | |
<veryBig> | |
<wantedTag>Hello World</wantedTag> |
s4cmd is the fastest way I've found (a command-line utility written in Python):
pip install s4cmd
Now to calculate the entire bucket size using multiple threads:
s4cmd du -r s3://bucket-name
$ split -C 15M --numeric-suffixes --suffix-length=4 input_filename output_filename_without_suffix
creates files like output_filename_without_suffix0001 output_filename_without_suffix0002 output_filename_without_suffix0003 ... each of max size 15 megabytes.
. |