mikeburns Posted November 14, 2008 Share Posted November 14, 2008 Hello all, I'll get straight to my problem: I typed in ls -al | less obviously to get the directory listing. Then before I quit the less command with :q , I pressed ctrl+ins and typed in the command: ls /my/path/ | grep -Pie 'regexp_here' OOPS, I forgot to quit less . So I quit. But every time I execute ANY piped grep command, the results are as follows: # ls /my/path/ | grep -Pie 'regexp_here' | grep -Pie 'regexp_here' ./results_that_match_regexp ./results_that_match_regexp ./results_that_match_regexp ./results_that_match_regexp ... how can I get rid of this? I logged out and logged back on, thinking it was tied into my session, and looked through a few files in the /~ directory, but didn't find anything that helped me. I hope I phrased my question properly and gave you a good description of the problem. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/132736-solved-piping-quirk-using-less-command/ Share on other sites More sharing options...
mikeburns Posted November 14, 2008 Author Share Posted November 14, 2008 Ok, I figured it out myelf. If you press SHIFT+INSERT while "less" is running, then it prompts you for a place to store the log file. So it acutally created a log file named (ls /path/here/ | grep -Pie 'regexp_here') so that is why the file appeared when I ran the command silly me. Link to comment https://forums.phpfreaks.com/topic/132736-solved-piping-quirk-using-less-command/#findComment-690310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.