Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control -M, urgent explanation pls ... 3

Status
Not open for further replies.

hendnov

Technical User
Feb 27, 2006
73
AU
Hi guys,

Just wondering, I will have the interview about the unix job but the important knowledge about :

"Control -m", awk and sed

Do you guys have any idea about what he means by Control -M, it's the name of scripting or what ?

Your soon answer will be much appreciated ...
 
Control-M is a carrage-return ^M sometimes seen when you FTP an file from windows to Unix using the ascii instead of binary. To get rid you could use the following command in vi

1. replace all extraneous ^M:

:%s/^M$//g

BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING "CARROT M"! This expression will replace all the ^M's that have carriage returns after them with nothing. (The dollar ties the search to the end of a line)

2. replace all ^M's that need to have carriage returns:

:%s/^M/ /g

Once again: BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING "CARROT M"! This expression will replace all the ^M's that didn't have carriage returns after them with a carriage return.

Control-M is also an architecture from BMC

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Some (probably most) *nixes have a built-in for removing these ^M's, for example dos2unix in Solaris.
 
lol,

I know about that guys, are you guys sure he's not talking about some scripting or some unix language ?

coz i thought it's something like scripting name, lol.
So, it's definitely not scripting name or language name right ?

Thx guys
 
Hi

mrn said:
sometimes seen when you FTP an file from windows to Unix using the ascii instead of binary.
I think is vice versa. In ascii mode the end-of-line marks will be converted, in binary mode not. So the ^M will appear after a binary transfer.

Feherke.
 
mrn and columb are correct. I'm sure in this context they were meaning Control-M the product from BMC and not a control character.

Control-M is job scheduling software. It allows you to create sets of related jobs with dependencies. For instance, job C won't start until both job A and job B end with successful completion codes. Jobs also can start as soon as prerequisite jobs have completed, instead of waiting for a specific time. You can have jobs start on certain conditions (i.e. the arrival of a file) and notify you of problems during a jobs run.

I've used Control-M before and think it's an awesome tool! Puts [tt]cron[/tt] to shame. There's a lot more work to set the job streams up, but it allows you to do things that [tt]cron[/tt] could never do. It is a great tool if you have a batch heavy work load.
 
I did say that at the bottom of my first post....

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Yes, I did say mrn and columb both mentioned it. Here, I'll share my star with you guys. [bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top