I have a file with a similar format to the following:
1.1.1.5 Ensure mounting of hfsplus filesystems is disabled
1.1.1.6 Ensure mounting of squashfs filesystems is disabled
1.1.15 Ensure nodev option set on /dev/shm partition
1.1.16 Ensure nosuid option set on /dev/shm partition
1.2.2 Ensure GPG keys are configured
1.3.1 Ensure AIDE is installed
They don't all start with Ensure
.
I am trying to import this into a spreadsheet with the first column (the x.x.x.x) in the first column of the spreadsheet.
I need to delimit the first column with, for example, a comma so that LibreOffice can use it as a separator.
How can I change the file to add a comma after the first column so that LibreOffice can use it as a separator using bash?
sed
command.. very simple to do it... https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files – Sundeep Jul 06 '17 at 10:25