Skip to content

Instantly share code, notes, and snippets.

@Sarverott
Created April 30, 2022 13:30
// EXECUTE: help | pipetest "dest.txt" | find "HELP"
#include <iostream>
using namespace std;
int main(int argc, char *argv[]){
char tmpBuff=0;
while(argc-->0){
cout<<"\t"<<(argv++)<<endl;
}
while(cin.good()){
if(cin.get(tmpBuff))cout.put(tmpBuff);
//if(cin.get(tmpBuff))cerr.put(tmpBuff);
//if(cin.get(tmpBuff))clog.put(tmpBuff);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment