Tag Info

Hot answers tagged

3

Try this #!/bin/bash node=$(sed -n 1p list) sed -i 1d list


2

I know this is an old question, but it was not so easy for me to find a solution so I want to share what I found with you just in case you land in this page. In the RegKey HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections the 9th value of DefaultConnectionSettings store the flag of: Automatically detect settings Use ...


2

You're slightly wrong in passing the third argument. In the command you've provided you pass instructions as many arguments, and, additionally, you echo local $PATH. You must pass the whole command as one argument, in single quotes. Instead of ssh root@B export PATH=$PATH:/add/stuff/here && echo $PATH Which is: (ssh + root@B + export + PATH=...) ...


2

I would like to run a script in Windows right before standby/sleep mode You can use the Task Scheduler to create a task that is triggered by a Kernel-Power log event that indicates "Sleep": Run "Task Scheduler". Select "Task Scheduler Library Click menu "Action" > "Create Task" Select "General" and give the task a "Name" and Description" Select "Triggers" ...


2

Simply declare a flag: FIRST=0 if [ ! $FIRST ]; then ; do what you need FIRST=1 else ... fi


2

Sounds like you are witnessing the filesystem cache doing its job. First of all, when you copy a file the computer must read that file into memory before it can write it back out to the copy. Reading that file represents a time cost, so the in-memory copy is kept around in the cache in case you need it again. Like if you open that file you just copied, or ...


1

Get the "last" version from a directory of directories An interesting question, since it's Windows batch! dir is your friend here; borrowing from PabloG's answer over on SO: @ECHO OFF FOR /F %%I IN ('DIR *.* /B /O:G-N') DO ECHO %%I & EXIT /B Place in RootFolder named lastversion.bat (or whatever). You can test by invoking from cmd.exe1. Please note ...


1

Some hints (pun not intended). Adding a new extended hint mode: You can define the mode with the hints.addMode function. You can set the pattern to add hints for with the eht option, which takes an XPath selector. (In Pentadactyl you can also use CSS selectors, but I'm not sure about Vimperator - there's no mention of them in the help pages) Here's an ...


1

I ran into the same issue, luckily I found a solution. Here are things I checked: permission of folder permission of openvpn to access script the script must list the full path of any commands used (ex. grep should be /bin/grep; you can find the full path by typing which in front of your command) use script-security 2 system instead


1

To enable screen sharing I used sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all To turn on airport I used networksetup -setairportpower airport on To connect to a specific ...


1

You can cut videos according to frame with handbrake (although it converts video). However it can't cut them automatically taking frame data from a CSV file. You need to select the start frame and end frame manually. Maybe x264.exe with command line can help.


1

Your comment shows menue.sh starting with #!/binbash.  This should be #!/bin/bash.  Or, if you aren’t using any bash-specific code, you can just use #!/bin/sh. You seem to be calling your scripts (from within the other scripts) as /root/scriptexample/./examplenewterminal.sh and /root/scriptexample/./example.sh.  These should probably be just ...


1

You could do this in notepad++ with search replace (or anything that has fairly good search replace). In this case, choose the regular expression search mode: Search: .+?username": "(.+?)".+?\} Replace: \1\n This puts the usernames on a line by themselves, which you could then drop into Excel to put a line number at the beginning if you wanted, or use ...


1

Since you haven't specified your OS, I'll assume Windows. Use ffmpeg in combination with PowerShell ISE PowerShell $folder = "C:\path\to\musicfolder" $ffmpeg = "C:\path\to\ffmpeg.exe" $content = "track start track end Filepath`n" Get-ChildItem $folder -Recurse -Include *.mp3,*.ogg,*.flac | foreach { $log = & $ffmpeg -hide_banner ...


1

Check out the tools available at from WikiTeam. http://archiveteam.org/index.php?title=WikiTeam I personally use wikiteam's dumpgenerator.py which is available here: https://github.com/WikiTeam/wikiteam It depends on python 2. You can get the software using git or download the zip from github: git clone https://github.com/WikiTeam/wikiteam.git The ...


1

If you're looking to save what the Session Management control module calls the "manually saved session": qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession If you're looking to overwrite the session that normally gets saved upon logout: qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSessionAs "saved ...


1

This might get you some of the way: choco list -li lists installed packages (programs), whether installed by Chocolately, or not, as in your case. Adding -v gives you (sometimes) the install path: choco list -liv Then you could find the appropriate Chocolatey packages by searching chocolatey.org manually (or by some other means...) for the programs ...



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