- Aug
- 2,257
- 108
This is in response to Bob Chapman, and his wanting to learn more about TPIPE.
Take a read of http://jpsoft.com/forums/threads/delete-a-line-from-a-file.4961/#post-28369
I would never have thought to use TPIPE to solve my problem, if Rex had not pointed me in the proper direction.
I guess the best way to learn is to present your problem here on the forums, and see what response you get.
For example, I would like to get a list of the URLs in the FireFox sessionstore.js file. I presently do this using a combination of TCC and BASH;
Not very elegant, but it does what I want it to do.
If I could figure out how to replace the urls.sh BASH script with TPIPE, that would be great. Not really sure where to start with TPIPE, though, to accomplish this. I find the help for TPIPE to be overwhelming, mainly due to my declining eyesight, and the lack of TPIPE examples.
Joe
Take a read of http://jpsoft.com/forums/threads/delete-a-line-from-a-file.4961/#post-28369
I would never have thought to use TPIPE to solve my problem, if Rex had not pointed me in the proper direction.
I guess the best way to learn is to present your problem here on the forums, and see what response you get.
For example, I would like to get a list of the URLs in the FireFox sessionstore.js file. I presently do this using a combination of TCC and BASH;
Code:
@setlocal
@echo off
cd %appdata
set thefile=%@execstr[dir sessionstore.js /s/b]
iff exist %@quote[%thefile] then
if exist c:\utils\sessionstore.js del c:\utils\sessionstore.js
if exist c:\utils\results.txt? del c:\utils\results.txt?
copy %@quote[%thefile] c:\utils
cd c:\cygwin\bin
bash --login "c:\utils\urls.sh"
cd c:\utils
dir /[d-0]
if exist c:\utils\results.txt? call listc.btm results.txt?
if exist c:\utils\sessionstore.js del c:\utils\sessionstore.js
if exist c:\utils\results.txt? del c:\utils\results.txt?
else
echo The sessionstore.js file does not exist.
endiff
endlocal
Code:
#!/bin
sed -e 's/{"url":/\n&/g' /cygdrive/c/utils/sessionstore.js | cut -d\" -f4 > /cygdrive/c/utils/results.txt
Not very elegant, but it does what I want it to do.
If I could figure out how to replace the urls.sh BASH script with TPIPE, that would be great. Not really sure where to start with TPIPE, though, to accomplish this. I find the help for TPIPE to be overwhelming, mainly due to my declining eyesight, and the lack of TPIPE examples.
Joe