well i did touch test.txt
and when i do file -bi output_gt/test.txt
im getting :
and then i trying to write data in utf8 encoding to it with
$data >> test.txt
and all in gibberish
when i do on the file file -bi output_gt/test.txt:
im getting :
what can i do ?
I can't get touch to simultaneously create three empty files file1, file2, file3. I tried:$ touch filebut all I got was one file:$ fileWhat did I do wrong? (4 Replies)
Hi All,
I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both.
The value of $? is coming 0 in if part also and else part too.
#!/bin/ksh
if ]; then
echo "data"
# exit 0
echo "$?"
else... (4 Replies)
Hi,
I have a file in my desktop which is a unicode format. After this file is transferred to Unix using FTP, we are seeing some special character (like rectangle box type) at the first line. The same file is saved as UTF8 (using textpad tool, selecting encode to UTF-8 option) on my desktopand... (7 Replies)
Hello all,
I'd like to replace "," by "/" in a utf8 file from postion X to Y. Comma "," is also defined as delimiter.
12345678901234567890,123456789012345,12345678901234567890,
aaaa,aaaa,aaaaa ,bbb,bbbb,bbbbb ,cccccc,cc ,
Result should be... (1 Reply)
Hi,
I am trying to write an Archive script that should look for files older than x days, zip them and move the zip to the archive directory and delete the files that have been zipped. I am not sure how i can handle this error:
"cowardly refusing to create an empty archieve".
Just wanted to know... (9 Replies)
All,
I have several *.dat files which is created in windows (ANSI Endoing) Or PC File format, once I copy those files to unix.
How can I convert those file to utf8 encoding ?
I tired iconv, it says not supported
Please help
Thanks
- S (5 Replies)
Hi,
i need a single command to create multiple empty files(no trailing lines as well) and empty the files if already existing.
please let me know or if this has been ansered, if some ocan share the link please, thanks
> newfile.txt
or
:> newfile.txt
do not work (4 Replies)
Hello Guys.
Please I would like to create empty files from a list
In file1 will be the followin values, so i will like to create for each name a empty file.
file1
2191off-r0.sps
2192off-r0.sps
2193off-r0.sps
2194off-r0.sps
2195off-r0.sps
So I need to get 5 empty files.
Thanks for... (7 Replies)
Hi all,
Is Der any unix command which will create a empty dataset ..?(in .ds ).I know we can use orchadmin dump command to view dataset data.. but how to create a dataset..?
like
sampledataset.ds
thanks in advance
hemanthsaikumar (1 Reply)
Discussion started by: hemanthsaikumar
1 Replies
LEARN ABOUT DEBIAN
json_xs
JSON_XS(1p) User Contributed Perl Documentation JSON_XS(1p)NAME
json_xs - JSON::XS commandline utility
SYNOPSIS
json_xs [-v] [-f inputformat] [-t outputformat]
DESCRIPTION
json_xs converts between some input and output formats (one of them is JSON).
The default input format is "json" and the default output format is "json-pretty".
OPTIONS -v Be slightly more verbose.
-f fromformat
Read a file in the given format from STDIN.
"fromformat" can be one of:
json - a json text encoded, either utf-8, utf16-be/le, utf32-be/le
storable - a Storable frozen value
storable-file - a Storable file (Storable has two incompatible formats)
clzf - Compress::LZF format (requires that module to be installed)
yaml - YAML (avoid at all costs, requires the YAML module :)
eval - evaluate the given code as (non-utf-8) Perl, basically the reverse of "-t dump"
-t toformat
Write the file in the given format to STDOUT.
"toformat" can be one of:
json, json-utf-8 - json, utf-8 encoded
json-pretty - as above, but pretty-printed
json-utf-16le, json-utf-16be - little endian/big endian utf-16
json-utf-32le, json-utf-32be - little endian/big endian utf-32
storable - a Storable frozen value in network format
storable-file - a Storable file in network format (Storable has two incompatible formats)
clzf - Compress::LZF format
yaml - YAML
dump - Data::Dump
dumper - Data::Dumper
Note that Data::Dumper doesn't handle self-referential data structures correctly - use "dump" instead.
EXAMPLES
json_xs -t null <isitreally.json
"JSON Lint" - tries to parse the file isitreally.json as JSON - if it is valid JSON, the command outputs nothing, otherwise it will print
an error message and exit with non-zero exit status.
<src.json json_xs >pretty.json
Prettify the JSON file src.json to dst.json.
json_xs -f storable-file <file
Read the serialised Storable file file and print a human-readable JSON version of it to STDOUT.
json_xs -f storable-file -t yaml <file
Same as above, but write YAML instead (not using JSON at all :)
lwp-request http://cpantesters.perl.org/show/JSON-XS.json | json_xs
Fetch the cpan-testers result summary "JSON::XS" and pretty-print it.
AUTHOR
Copyright (C) 2008 Marc Lehmann <json@schmorp.de>
perl v5.14.2 2010-08-17 JSON_XS(1p)