Tag Info

Hot answers tagged

3

It's your locale, prefix your sort command with a locale setting that specifies the collation order you desire $ cat test2.txt a/d a/a a/c a//c $ sort test2.txt a/a a/c a//c a/d $ LANG=C sort test2.txt a//c a/a a/c a/d man sort says *** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional ...


3

There is more than one way to skin this cat: You can put a symlink to your binary in a directory that is already in your PATH (/usr/local/bin for example). You can modify your PATH to include the directory with your binary in it. One way to do this is add the following to ~/.profile: PATH="$PATH:/path/to/directory/" export PATH You could even add an ...


2

Since I was curious as well, I collected some information; it is the original name of "\DosDevices" and usually used by modules which need to access kernel mode object names. e.g. device drivers, subsystem modules, .. Please note that, "\DosDevices" seems to be a symbolic link to "\??", so "\??" is the real name. It was believed that they tried to minimise ...


2

If you start console application thru LNK file then settings come from that LNK (if present) and saved to it. Win+X LNKs located here %LocalAppData%\Microsoft\Windows\WinX and "Visual Studio Command Prompt" is also LNK, so settings come not from registry. If you start console application by EXE file then the settings come and saved to ...


2

Yes, assuming a POSIX shell, use shell pattern matching: rm -rf *??????? in that directory. Note that this matches any file or subdirectory with 7 or more characters, so be careful!


2

Don't forget, the shell doesn't know the difference between multiple arguments and files with a space in them. You can use quotes to tell the shell when a single argument should have a space in it: For example, ren %%i %%~nc.%%i, change to ren "%%i" "%%~nc.%%i" And put quotes around any other arguments in your program that may have embedded spaces.


1

You don't have to write a batch file. Just create a shortcut of taskkill.exe on desktop and modify the shortcut to have the arguments you use on "Target" field. If you want to be cooler, change the attribute of that shortcut to "hidden" and the keyboard shortcut will still work. Just don't forget that you made this hidden shortcut; or you'll be in trouble ...


1

This works for me: ls | mate The exact command depends on your editor of choice, I have TextMate installed as my main editor.


1

Have you tried using !program.exe input.mdu ? This should return control to Matlab after program.exe is run. See the section on exclamation point in help punct EDIT: This will not help if the program does not quit though.


1

Just pipe the results to grep -v grep like ps -ef | grep -i "websocket" | grep -v grep This will remove the ps record with the grep in it.


1

tl;dr - Problem you got there is that echo %Q% expands to echo. Use echo.%Q% Expanded Answer echo command got 4 behaviors: echo on - enables echoing commands. echo off - disables echoing commands. echo - shows state of echoing commands option. echo ... - puts ... and newline on the screen. If you pass variable to echo as an argument, and it's empty, it ...


1

Issue: AFTER successfully removing the 'RocketTab' malware (using a utility such as Malwarebytes Anti-malware), Windows starts up with a 'Command Prompt' (cmd.exe) appears and is shortly followed by an error message reading, "Windows cannot find c:\program files(x86)\rocket tab\client.exe". Resolution: Open the 'C:\windows\system32\tasks' directory. Locate ...


1

I suspect it's because of the behavior mentioned in Raymond Chen's blog (warning - not actual documentation). For example, if your pattern ends in .*, the .* is ignored. Without this rule, the pattern *.* would match only files that contained a dot, which would break probably 90% of all the batch files on the planet, as well as everybody's muscle ...


1

I think @dsolimano (and his source, Raymond Chen) got pretty close to your problem but perhaps don't quite have the right explanation. After some thinking and searching and testing, although I've yet to come up with actual documentation to back this up, I believe I've come to a reasonably accurate conclusion. My hypothesis is based on somewhat related ...


1

Use DIR /ad to filter directory listings to contain only directories entries.


1

Try: grep -oE '\$\w+' */templates/*.php | sort -u Notes: The -o option tells grep to print only the matching portions of the line, not the whole line. This should give you the names of all $-style variables. sort -u sorts and removes duplicates so each variable name should appear in the output only once. The \w construct that you were using requires ...



Only top voted, non community-wiki answers of a minimum length are eligible