There are a few different ways to convert a DOS file to Unix format, but the most available is probably this:
$ col -bx < dosfile > unixfile
colcommandsconvertdosfilterline-endingsnewlineshellunix
To list all the high memory processes in cmd:
C:\Windows\System32>tasklist /fi "memusage gt 10000" Image Name PID Session Name Session# Mem Usage ========================= ====== ================ ======== ============ svchost.exe 1600 Console 0 30,296 K MsDtsSrvr.exe 964 Console 0 14,272 K Rtvscan.exe 920 Console 0 47,524 K searchindexer.exe 2364 Console 0 33,392 K explorer.exe 3220 Console 0 38,992 K vmware-tray.exe 2452 Console 0 20,068 K DSAgnt.exe 4252 Console 0 11,664 K Launchy.exe 4892 Console 0 17,704 K WindowsSearch.exe 5448 Console 0 11,800 K OUTLOOK.EXE 5004 Console 0 84,624 K pidgin.exe 5744 Console 0 24,308 K firefox.exe 4756 Console 0 122,652 K
cmddosloadmemoryprocessestasklist
I'm still hammering this out, but it works as-is:
@echo off rem Simple script to map a drive using the new IP provided. echo Enter final octet: set /p OCTET= net use z: \\10.0.100.%OCTET%\c$ /user:inside\<username> <password>
I'd like the octet entry and the echo to be on the same line, but aside from that, working as advertised.
authenticationbatbatchdosdriveechomountnetremset
Given an array @slobber, replace all the CR-LF with CR:
foreach (@slobber) {
s/\015\012$/\n/; print;
}
dosforeachlanguagesline-endingsperlprogrammingsyntaxunix