Skip to content

Instantly share code, notes, and snippets.

layout title date comments categories
post
命令行JSON,CSV数据处理工具简介
2014-01-01 11:03
true
json

简介

json现在是最流行的数据交换格式了,但是在命令行中显示, 查找, 处理, 还是不如纯文本方便, 但是有了下面这些工具, 处理json数据可以易如反掌了。。

Rank Repository Language Stars
1 twbs/bootstrap JavaScript 62111
2 jquery/jquery JavaScript 27082
3 joyent/node JavaScript 26352
4 h5bp/html5-boilerplate CSS 23355
5 mbostock/d3 JavaScript 20715
6 rails/rails Ruby 20284
7 FortAwesome/Font-Awesome CSS 19506
8 bartaz/impress.js JavaScript 18637
9 angular/angular.js JavaScript 17994
function Foo() {}
// Foo.prototype 是Object的一个实例
console.log(Foo.prototype.__proto__ === Object.prototype);
console.log(Foo.prototype.constructor === Foo);
var f1 = new Foo();
// f1是Foo的一个实例
console.log(f1.__proto__ == Foo.prototype);
console.log(f1.__proto__.constructor === Foo);
var User = {
count: 1,
getCount: function() {
return this.count;
}
};
console.log(User.getCount());
function fun1() {
var a = 1;
return function() {
return a++;
};
}
var add1 = fun1();
console.log(add1());
/* global console */
var str = "hello world";
console.log("str: " + str);
console.log();
console.log("slice(3): " + str.slice(3));
console.log("substring(3): " + str.substring(3));
console.log("substr(3): " + str.substr(3));
//'use strict';
var global = this;
(function() {
'use strict';
// object
(function() {
var person = {};
person.name = 'www';
console.log('1:');
(function() {
var a = [1,2,3,4];
console.log(a.length);
a.length = 2;
console.log(a);
a.length = 4;
console.log(a);
})();
console.log('1:');
(function() {
console.log(add(1, 2));
function add(a, b) {
return a + b;
}
})();
console.log('2:');
(function() {
console.log('1:');
(function() {
if (true) {
var a = 'a';
}
console.log(a);
if (false) {
var b = 'b';
}
console.log(b);