Skip to main content

Hello



I have an extension attribute which does a simply cat of a txt file.



The problem is the txt file has carriage returns in it and I would like to include them because the recon inventory shows all the information bunched together and i need to be able to separate the data Can anyone help at all?

Welcome to my feature request. It used to, but Jamf stopped it doing this. Add yourself to the request and send your jamf contact the same information.



https://jamfnation.jamfsoftware.com/featureRequest.html?id=110



Sean


Thanks very much


Here is a way to translate the newlines into a different delimiter so you can parse it back out later.



$ cat test
blah
blah
blah
$ echo "<result>$(cat test | tr "
" ":")</result>"
<result>blah:blah:blah:</result>
$


*shrug*



May help a bit in the meantime.


Hi rmanly



Please can you help i am not clear on your solution. I am currently using this but i do not know what to change it to



#!/bin/bash
drives=cat /var/tmp/external_drives_monitor/drives.txt
echo "<result>$drives</result>"
exit0


Apologies. I was being thick


XD