New answers tagged

0

If you have mapped \\128.545.k.k\E_Drive then use that in your ren command (not E:): ren \\128.545.k.k\E_Drive\abc xyz


0

The indentation code for shell scripts has been completely rewritten around the time of Emacs-24 to use SMIE, and SMIE itself has evolved during the life of Emacs-24, so the best solution may depend on your exact Emacs version, but with Emacs-24.5 you should be able to do: Go to the line with incorrect indentation. type M-x smie-config-show-indent which ...


0

Try this: sed '2,$s/^Virtual Machine/\n&/' file


0

Write and empty echo where you want that newline For example echo Foo echo echo Bar Results in... Foo Bar


0

I wanted to solve a similar problem: As part of a script which generated a file, automatically add it to subversion if this had not been done previously. I found the following worked: if ! svn info ${file} 1>/dev/null 2>&1 ; then svn add ${file} fi Testing exit values in Bash led me to this answer.


0

Not an answer, but a work around. Context: I have an older Macbook which I use as a headless Plex sever. I would like to keep it connected to VPN pretty much always. I would also like notifications when it connects and disconnects. I ended up creating a event handling app. Then I used Apple Remote Events to call it and pass in arguments. After the ...


0

Are you connected to a network? Are there any others (computers) on the network? Do they know your password and username on the targeted user/computer If so change your password, if a person on the network knows those details, they can modify your computer in any way, they could be the culprit, and are there any other changes that you have noticed, try ...


0

For example in a bash script you can print the fifth field of the file /etc/passwd with awk/gawk: awk -F ":" '{print $5}' /etc/passwd The option -F fs uses fs for the input field separator (in this case :). You can read more, for example, on the GNU awk homepage [1]. Awk has the function split() to split a string (where in this case you will use the 5th ...


0

POSIX 7 says you can't http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html -e is not defined and backslashes are implementation defined: If the first operand is -n, or if any of the operands contain a <backslash> character, the results are implementation-defined. unless you have an optional XSI extension. So use printf instead: ...


0

This seems to work in bash: (echo -e "n.add State:/Network/Global/IPv4\nn.watch" & cat) | \ scutil | \ awk '/notification/ {system("echo change")}' replace echo change with your command, keeping in mind that if you need to quote anything in your command, you'll need to use '\'': (echo -e "n.add State:/Network/Global/IPv4\nn.watch" & cat) | \ ...


1

Try: for /F "usebackq" %b in (`wmic process where ParentProcessId^=0 get ProcessId`) do echo %b The “=” sign is escaped with a “^”. Also note that the wmic command itself is enclosed in “back quotes” as called for by your use of the usebackq parameter.


1

How would I escape this character = sign? for /F "usebackq" %%b in (wmic process where ParentProcessId=%PID% get ProcessId) do ( There are two problems with the above: When using "usebackq" you need to put backquotes around the command to be processed by for. There needs to be quotes " around the where clause of wmic. Use the following batch file: ...


0

Indeed here is how I solve it thanks to glenn jackman advice: env git clone --depth=1 https://github.com/rafaelrinaldi/theme-pure.git; or begin; printf "Error: git clone of theme-pure repo failed\n" exit 1 end Doc See official doc begin - start a new block of code.


0

You need to specify the Content-Transfer-Encoding for the MIME part with the attachment. I don't know if uuencode is a standard one. Base64 is though. You also need to send the closing boundary marker. Your redirection into cat is wrong. (cat << ! From: $FROM To: $TO Subject: $SUBJECT Date: $(date +"%a, %b %e %Y %T %z") Mime-Version: 1.0 ...



Top 50 recent answers are included