Dit script kun je gebruiken voor het opvragen van de naam van je USB stick.
De naam van je USB stick kun je gebruiken in het sudo commando van Apple om een USB installer te maken.
Stap 1: Open de Terminal applicatie
Stap 2: Ga naar je home directory, type: # cd
Stap 3: Maak eventueel een directory scripts, type: # mkdir scripts
Stap 4: Ga naar de zojuist gemaakte scripts directory, type: # cd scripts
Zie hieronder een voorbeeld script om aan het einde van de regel helemaal rechts uitgelijnd een SUCCES melding in het groen of een FAILED melding in het rood te krijgen.
#!/bin/bash # Set the message success_message="Your command was successful" failed_message="Your command failed" # Set the "OK" string in green ok="$(tput setaf 2)[SUCCES]$(tput sgr0)" failed="$(tput setaf 1)[FAILED]$(tput sgr0)" # Get the width of the terminal term_width=$(tput...
PowerShell computer resource monitor script with cpu percentage and advanced memory information
PowerShell Resource monitor $app="notepad" $ids = Get-Process $app | Select-Object -Property Id | ForEach-Object {$_.Id} $filedate = Get-Date -format "yyyy-MM-dd" #echo $pids foreach ($id in $ids) { $date = Get-Date -format "yyyy-MM-dd HH:mm:ss" # process CPU information $ProcessId = $id $Process = Get-WmiObject -Query "SELECT * FROM...