Tag Info

Hot answers tagged

4

The major factors you'll need to put the script together would be the following, (I would recommend you write each one as a separate bit of code, test it, then put it all together once you are happy): File naming (ie using the current date in your tarball name): As stated in an other answer, man date will give you some help, focus on the format section (eg ...


2

You should be able to invoke a script by running a status query after calling WMI Class Win32_bus Class On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_Bus") For Each ...


2

I am not sure if this is possible without any 3rd party tools so here's my approach done with one handy tool from Nirsoft. Download devmanview.exe, move it to the system32 folder and run it. Find the specified GPU, right click it and click Properties, copy the Device Name value and paste it somewhere, because you'll need it later. Now copy this into ...


2

The key to starting any scripting problem is to break it down into small pieces. Code and and test the first small pieces before adding more function. For example step 1 You could start by wring a script that prints "Starting backup" and does nothing else. step 2 Once that works amend it to assign the output of the date command to a shell variable ...


1

It is not a script, per se, but rather a module. The module source is linked at the top of the page (the Source link). You need to save the module to your system to use it. After that you write your own script that imports this module and then you can use the functions from the module in your script. The page has a sample script that uses the module. ...


1

To get the PID of the Parent Process, you can use the command: ps -ef It will give you a process listing that includes both of the PIDs. If the command was started from a script, then the PPID (parent process ID) that the command returns would the PID of the script that started it.


1

Try doing this : find -type f -exec bash -c ' (( $(wc -l < "$1") > 80)) && echo "$1" ' -- {} \;



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