In my old shop, we only had AIX machines there (all of version 6.1 ). FTP ports were not open for these AIX machines because of some security thing. So, we can't ftp scripts in ASCII mode.
When we wanted to copy huge scripts (shell scripts, sql scripts , ..etc) from our Windows based laptop (scripts in notepad or textpad ) to those AIX machines, we had to manually copy and paste to the vi editor in the AIX machine because SCPing the scripts can introduce unwanted characters ( SCP can be done only in bin mode. )
So, when I tried copying big scripts , VI editor in AIX didn't allow more than 100 lines to be copied at a time. So, for a 1000 line script , we had to copy paste 10 times part by part!
In my new shop , we have both AIX (5.3) and RHEL 5.4 . But i did manage to copy and paste a 2000 line script from Windows XP notepad to VI editors in both AIX and RHEL in one go. VI editor doesn't seem to have a limit of 100 lines here. Only difference from my Old shop and here is that i am using putty in the current shop. In my earlier shop where I encountered the 100 line limit , I was using tectia as the ssh client . Could this be the reason ? Have you guys faced a similair situation ?
Most all Linux distributions use vim (Vi IMproved). This is why you can do more there. Yes, the original "vi" that comes with archaic Unix based systems is pretty limited. Don't expect miracles there. However, many of those legacy OS's, including AIX, do support the installation of programs like vim, so maybe that is a solution (??).
Radoulov said:
Convert the files using dos2unix after the secure copy (scp).
dos2unix is meant for removing only Control^M characters. Right ? I think SCPing an ASCII file (in bin mode) can introduce other unwanted characters as well.