0
我想爲以下轉換(文本選擇)創建一個Automator服務。Automator Service Shelll腳本:對選定的文本進行排序第二個參數
排序WRT第二個參數
輸入:
#define Type1 String(@"Type1", @"Other")
#define Type2 String(@"Type2", @"Britain")
#define Type3 String(@"Type3", @"America")
#define Type4 String(@"Type4", @"Canada")
OUTPUT:
#define Type3 String(@"Type3", @"America")
#define Type2 String(@"Type2", @"Britain")
#define Type4 String(@"Type4", @"Canada")
#define Type1 String(@"Type1", @"Other")
我知道我可以使用sort | uniq
命令,但將排序由左到右。 但我想排序第二個參數如上所示。
謝謝!
那真棒! – 2013-04-09 04:29:24