Hack Forums
[Shell] My >> turns into a 1> - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] My >> turns into a 1> (/showthread.php?tid=5846628)



My >> turns into a 1> - Salacity - Jun 9, 2018

Has been fixed, the solution is at the end of the OP, or refer to Sir-TeaBags post Thank you, Sir-TeaBag for helping me fix this

So, i'm trying to decipher the meaning of certain typedef definitions inside of header files and to do this I decided to use the FIND command to trace their meanings, but since it only looks in one directory at a time, I have to re-write the command in order for it to look inside of other directories. I wrote a bash script to automate this, but i keep getting a weird error i cant fix. Basically, the pipe symbols ( >> ) turn into (1>) so:

find \i "moneyTree" C:\Users\John\Desktop\MyHouse >> myWallet.txt

Turns into:

find \i "moneyTree" C:\Users\John\Desktop\MyHouse 1> myWallet.txt

After trying a few things and looking in google, I decided to make a thread hopefully I can get some help here:

=-=-=-=      START - CODE     -=-=-=-=-=-=-

SET KEYWORD=PASCAL
SET SEARCH_PATH=C:\MingGW\Include\*
SET ALT_SEARCH_PATH=C:\MingGW\Include\
SET OUTPUT_FILE=C:\users\john\desktop\output.txt

FIND \I "%KEYWORD%" %SEARCH_PATH% >>  %OUTPUT_FILE%

PAUSE

=-=-=-=      END - CODE     -=-=-=-=-=-=-

🎉


-=-=-=-=-  FIX -=-=-=-=-=-=-=-=-
For some reason, I have to add carets before each "greater than" symbol. So the correct code would be:

find \i "moneyTree" C:\Users\John\Desktop\MyHouse ^>^> myWallet.txt


RE: My >> turns into a 1> - Sir-Teabag - Jun 10, 2018

Using >> shouldn't turn in to a 1 since i use that all the time...

Did you try adding carets?
Tell me if this works for you

Code
FIND \I "%KEYWORD%" %SEARCH_PATH% ^>^> %OUTPUT_FILE%



RE: My >> turns into a 1> - Salacity - Jun 10, 2018

(Jun 10, 2018 11:30 AM)Sir-Teabag Wrote:  Using >> shouldn't turn in to a 1 since i use that all the time...

Did you try adding carets?
Tell me if this works for you

Code
FIND \I "%KEYWORD%" %SEARCH_PATH% ^>^> %OUTPUT_FILE%

Thank you so much!! That was it


RE: My >> turns into a 1> - Sir-Teabag - Jun 10, 2018

(Jun 10, 2018 11:41 AM)Salacity Wrote:  Thank you so much!! That was it

Awesome! Glad I could help ✌ 🎉