Friday, May 30, 2014

Let Haters Be Your Motivators

DocOz Blog
Viewer Journal - May 30
========================


One day I saw a picture of myself and was stunned. I decided to get slim and I did.

I saw a DocOz episode that showed me how easy it can be.

View his 1-Step Plan Here -> http://www.rectwith.com/episode/thinner/7days/droz.episode

Everyday during my fitness journey it seemed like someone was trying to force some cheesecake or
fried junk in my face.

Little did they know I could eat that stuff and still lose weight (1-lb a day to be exact).
1 month later and I'm 20 lbs lighter w/out walking into a gym.

Now, Haters Are My Motivators...



- End Post
View Before and After Pics: http://www.rectwith.com/episode/thinner/7days/droz.episode















We are excited to have brought you this Blog update
to stop further updates from Update Notice Messages
118 Kecks Lane|Ruff Dale| PA 15679 or http://www.rectwith.com/p434g/94gjpw/rkgnv03.erkgjn


This is good! On my system 'time /t' gives '11:58 PM'. I could add another line with "set mytime%", or any other tweaks you can suggest? Added in another potential option to display in 24hr time, obviating the need for a PM/AM designatoI think instead of ("%TIME%"), you need to use ("echo %TIME%")exactly what I needed. Aduljr Dec 22 '10 at 15:421For UK folks you'll want For /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%b-%%a) for the second line.This is why I dont like the windows shell, way too much/complex statements for a simple thing like printing the day/time. Cojones Feb 15 '11 at 12@Rory living legend! Greg B Sep 6 '11 at 20:11
+1, it still helps, thanks! maialithar Sep 22 '11 at 13:18
This solution is locale dependent, Rory gave the example for UK for other locales where the date comes as 22-02-2012 you need to replace delims=/ with delims=- N@NunoFurtado Thanks a lot, it helped me! Piotr Sobczyk Apr 10 '12 at 9:26
I second the vote for PowerShell. It gives you just an extremely capable shellI can see PowerShell is capable of archieving this. But how can I make this run from a batch file (example: myProc.bat@Pablo, use powershell.exe and wrap ps command into single parameter Now Powershell is part of Windows as of Windows 7 so this really is a great option.-1.. Sure the answer was accepted, but it's not answer to the specified question. I posted another variation of Mike's answer where the data is piped into This will fail with a file in use error if you save to the same file. You need to change the powershell command to: (Get-Content test.txt) | ForEach-Object { $_ -replace "foo", "bar" } | Set-Content test.txt BigMomma Aug I'm trying to put this in a function but it doesn't work like that, neither does it show an error message. It just writes the same content. Could somebody please tell me what's wrong? function Replace { (Get-Content $args[0]) | ForEach-Object { $_ -replace "$($args[1])", "$($args[2])" } | Set-Content $args[0] } Replace test.txt foo ba@Psycho, It looks like you have an extra $() round your replacements... does the following work? function Replace { (Get-Content $args[0]) | ForEach-Object { $_ -replace "$args[1]", "$args[2]" } | Set-Content $args[0] } @Mike, that's the syntax (odd-looking, I agree) for referencing array elements in replacements, without it it prints the whole array and then the string "[1]" (or "[In PowerShell v3 there is -Raw parameter for Get-Content which makes processing large files significantly faster (in my case 200 times faster). It reads the whole file as a string not as an array of lines.Technically does not answer the original question, Powershell requires elevated privileges and may not be appropriate in all situations gareththegeek@gareththegeek You have a false assumption. Powershell does not require elevated privileges. I'm saying this so that future readers know this. What if I want to replace the content in the same file ( and not save a new file) ? Royi Namir Nov 11 '13 at 11:13@royinamir: I would guess that the following untested code would work: Get-Content test.txt | ForEach-Object { $_ -replace "foo", "bar" } | Set-Content test.txt @MikeSchall No. file in use.@royinamir: Looks like putting parentheses around On my system %TIME% returns values like " 0:01:15" and " 3:15:12" and the %%a%%b code in the answer gives a leading space like " 001" and " 315". To get a four digit hhmm use this: For /f "tokens=1-2 delims=/: " %%a in ("%TIME%") do (if %%a LSS 10 (set mytime=0%%a%%b) else (set mytime=%%a%%b)) That returns values like "0001" and "0315" which I prefer in my filenamNice version of the wmic command! So far I've only seen WMIC Path Win32_LocalTime Get Day,Hour,Minute,Month,Second,Year /Format:table. Likewise, to get 20120623-1619 in my local Amsterdam time zone, in one line: for /f %%a in ('wmic os get LocalDateTime ^| findstr ^[0-9]') do (set ts=%%a) & set datetime=%ts:~0,8%-%ts:~8,4% +1 for the wmic command, nice tip! CGK DeThe ISO order is appreciated (huzzah for automatic sorting), but note that full colons are not valid characters in Windows filenames (as per the OPthere is a problem with the military time example above, using %TIME% If the hour is before 10am you end up with " 9" which when you string it together yields a space in your variable string. Not good if you're using it for a filename. :-( stu if you include a space after the delim list for time... for /f "tokens=1-2 delims=/: " %%a in ('time /t') do (set mytime=%%a%%b) it will treat the AM/PM as a separate delimeter and not pick it upThe only answer that works among all the ones that I found about this topic

No comments:

Post a Comment

//SEO SCRIPT POWERED BY www.alltechbuzz.in