<commit_before>
#include "DoubleGreaterThan.h"


    DoubleGreaterThan::DoubleGreaterThan(Runcmd* r, Runcmd* l) : Connector(">>",r,l)
    {
        
        
    }
    
    bool DoubleGreaterThan::run()
    {

            char file[256];
            strcpy(file, rhs->getCmd().c_str());
            int redir;
            if((redir = open(file, O_RDWR | O_APPEND | O_CREAT , S_IRUSR | S_IWUSR | S_IROTH | S_IRGRP )) == -1)
            {
    				perror("Error with output redirection"); //error message with output redirection
    				return false;

    		}
    		
            int saveStdout = dup(1);

            if(-1 == dup2(redir, 1))
            {
	        	perror("There was an error with dup2");
		    
            }
            lhs->run();

            
            if(-1 == dup2(saveStdout, 1))
            {
	        	perror("There was an error with dup2");
		    
            }
            
            return true;
        
    }
<commit_msg>Create DoubleGreaterThan.h<commit_after>#ifndef DoubleGreaterThan_H
#define DoubleGreaterThan_H

#include "Connector.h"

class DoubleGreaterThan : public Connector
{
    public:
        DoubleGreaterThan(Runcmd*,Runcmd*);
        bool run();
    
};

#endif

{'fraction_non_alphanumeric': 0.11386138613861387, 'fraction_numerical': 0.010726072607260726, 'mean_word_length': 1.6255411255411256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1323891', 'n_tokens_mistral': 411, 'n_tokens_neox': 388, 'n_words': 77}