I'm automating account creation here. To make a long story
short.........I have a Windoze admin that is spitting a script out for
me from the AD side. This is a script that has the shbang at the top
#!/bin/bash and then single lines of dseditgroup commands and an
at the end.
So, he's assuming the dseditgroup commands will always be successfull?
He can't get it to format the text for unix line endings.
So, the script he's generating won't execute.
I need to find out how I can take this file that's been created on the
Windoze side and replace all the line endings with Unix line
Assuming the carriage return only appears in CRLF sequences, a single
tr command could do the trick, by just deleting the carriage returns:
tr -d '\r'
More info in the man page of tr(1).
.....OR.....The other idea was for him to spit everything out in
one giant line with pipes separating the commands then convert the
into line endings but I'd need to figure out how to change a pipe
character into a line break character. : )
Again, tr may be of some use:
tr '|' '\n'
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden