This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr -d '\n' < file.txt > file2.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add characters to end of line | |
sed 's/$/",/' file1.txt > file2.txt | |
# Add characters to beginning of line | |
sed 's/^/"/' file1.txt > file2.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep '[^[:blank:]]' < file.txt > file2.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdmp.hostStatus(xdmp.host()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare namespace hs = "http://marklogic.com/xdmp/status/host"; | |
xdmp:host-status(xdmp:host())/hs:transactions/hs:transaction/hs:transaction-timestamp ! xdmp:timestamp-to-wallclock(.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare namespace hs = "http://marklogic.com/xdmp/status/host"; | |
xdmp:host-status(xdmp:host())/hs:transactions/hs:transaction/hs:database-id ! xdmp:database-name(.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare namespace hs = "http://marklogic.com/xdmp/status/host"; | |
xs:string(xdmp:host-status(xdmp:host())/hs:host-name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare namespace hs = "http://marklogic.com/xdmp/status/host"; | |
xdmp:host-status(xdmp:host()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for zip in *.zip | |
do | |
dirname=`echo $zip | sed 's/\.zip$//'` | |
if mkdir $dirname | |
then | |
if cd $dirname | |
then | |
unzip ../$zip | |
cd .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml" encoding "utf-8"; | |
(:~ | |
: Mark Logic multi-part POST Library | |
: Assembles a multi-part POST and performs an xdmp:post() sending the data to a webservice URI. | |
: | |
: The document can be read from the database or the filesystem. First the database is checked - | |
: if the information provided does not resolve a document in the database, it will fall back to | |
: trying to get the document from the filesystem | |
: | |
: @author <a href="mailto:[email protected]">Alex Bleasdale</a> |