Application & System: Development / Integration / Orchestration
Bash – CSV Row / Array To Single Column
Posted on
By David Kittell
cat environments.txt| sed "s|,|\n|g"| sed 's|"||g' | sed 's/^[ \t]*//;s/[ \t]*$//'
Originally Posted on October 19, 2021 Last Updated on August 17, 2024
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.
If you simply want uptime formatted this small script will help. uptime | awk -F'( |,|:)+’ ‘{print $6,$7",",$8,"hours,",$9,"minutes."}’ Uptime by itself will display similar to: 20:25:48 up 3 days, 8:14, 1 user, load average: 2.07, 2.17, 2.35 Formatted using the code above will display similar to: 3 days, 8 hours,…
‘Kelly Theriot 11-2004 ‘Kelly’s Korner Option Explicit Set ws = WScript.CreateObject("WScript.Shell") Dim ws, t, p1, n, cn, MyBox, vbdefaultbutton Dim itemtype p1 = "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" n = ws.RegRead(p1 & "PortNumber") t = "Change Port Number" cn = InputBox("Type in the new port number", t, n) If cn <> "" Then…