@@ -56,7 +56,7 @@ std::vector<int> findAll(std::string &str, char pattern) {
56
56
bool checkArgs (std::vector<std::string> &args){
57
57
std::vector<std::string> tmpargs;
58
58
for (int i=0 ;i<args.size ();i++){
59
- if (args[i]!=" &" &&args[i]!=" |" &&args[i]!=" >" ){
59
+ if (args[i]!=" &" &&args[i]!=" |" &&args[i]!=" >" &&args[i]!= " < " ){
60
60
tmpargs.push_back (args[i]);
61
61
}else {
62
62
if (tmpargs.empty ()){
@@ -65,7 +65,7 @@ bool checkArgs(std::vector<std::string> &args){
65
65
std::string last = tmpargs[tmpargs.size ()-1 ];
66
66
char c = last[last.size ()-1 ];
67
67
68
- if (c!=' &' &&c!=' |' &&c!=' >' )
68
+ if (c!=' &' &&c!=' |' &&c!=' >' &&c!= ' < ' )
69
69
tmpargs.push_back (args[i]);
70
70
else {
71
71
tmpargs.pop_back ();
@@ -78,7 +78,7 @@ bool checkArgs(std::vector<std::string> &args){
78
78
std::vector<std::string>().swap (tmpargs);// 置空
79
79
for (int i=0 ;i<args.size ();i++){
80
80
char c = args[i][0 ];
81
- if (c!=' &' &&c!=' |' &&c!=' >' ){
81
+ if (c!=' &' &&c!=' |' &&c!=' >' &&c!= ' < ' ){
82
82
continue ;
83
83
}else {
84
84
if (args[i]!=" &&" &&args[i]!=" ||" &&args[i]!=" &" &&args[i]!=" |" &&args[i]!=" >" &&args[i]!=" >>" &&args[i]!=" <" ){
@@ -185,6 +185,14 @@ void symbolSplit(std::vector<argStru> &tmpargs,std::vector<std::string> &args){
185
185
strs.swap (tmp);
186
186
std::vector<std::string>().swap (tmp);// tmp置空,strs为分割完的
187
187
188
+ for (int j=0 ;j<strs.size ();j++){
189
+ std::vector<std::string> strs1 = split (strs[j], " <" );
190
+ tmp.insert (tmp.end (),strs1.begin (),strs1.end ());
191
+ }
192
+ strs.swap (tmp);
193
+ std::vector<std::string>().swap (tmp);// tmp置空,strs为分割完的
194
+
195
+
188
196
for (int j=0 ;j<strs.size ();j++){
189
197
std::vector<std::string> strs1;
190
198
std::istringstream buffer (strs[j]);
0 commit comments