Re: FreeBSD bootable floppy Script NOT WORKING
Well, I'm not sure what it was but it wasn't the carnage return. But there is a hidden character. I did some simple scripts and the same code works when I re-typed the entire thing. The only parts that were effected were the encapsulated EOF tags. So there must have been some type of hidden character. Thanks for all the help. - Original Message - From: "Jerry McAllister" <[EMAIL PROTECTED]> To: "Roger 'Rocky' Vetterberg" <[EMAIL PROTECTED]> Cc: "John Bleichert" <[EMAIL PROTECTED]>; "Terry Cooper" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, October 22, 2002 7:36 AM Subject: Re: FreeBSD bootable floppy Script NOT WORKING > > > > John Bleichert wrote: > > > > *snip* > > > > > * EOM is not a command, it's an end-of-text marker, similar to the one > > > used in Perl. > > > > > > * There are text-file incompatibilities between Unix and DOS. If you're > > > copying/pasting the file from the website in Windows, ftp'ing it to a Unix > > > box and then trying to run it, all those extra linefeeds may cause > > > extremely bizzare errors. > > > > > > I hate to say it, but if you can only get the Internet on your winbox, you > > > should probably fire up vi (or whatever editor you like) and enter it > > > manally. Or run a dos2unix utility on the script on your Unix box to set > > > it up and clear out those linefeeds. > > > > A simple command like "perl -i.bak -npe 's/\r\n/\n/g' filename" will > > clear the linefeeds and even make a backup of the file. (It has never > > failed me, but you'll never know) > > I sort of doubt that extra CARRIAGE RETURNs (CR not Linefeeds LF) in the > file are what is causing his problems, but it may be. But, if you want > to get rid of all those extra returns there is an easy way - use 'tr' > This works well: > tr -d "\r" < INPUTFILE > OUTPUTFILE > > If you ftp text from a DOS environment to a UNIX environmtent, > then just set is to ASCII mode (type 'ascii' after the ftp session is > connected) and it will take care of managing the extra characters > very nicely with no other intervention needed. > > jerry > > > > > -- > > R > > > > > > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > > with "unsubscribe freebsd-questions" in the body of the message > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: FreeBSD bootable floppy Script NOT WORKING
> > John Bleichert wrote: > > *snip* > > > * EOM is not a command, it's an end-of-text marker, similar to the one > > used in Perl. > > > > * There are text-file incompatibilities between Unix and DOS. If you're > > copying/pasting the file from the website in Windows, ftp'ing it to a Unix > > box and then trying to run it, all those extra linefeeds may cause > > extremely bizzare errors. > > > > I hate to say it, but if you can only get the Internet on your winbox, you > > should probably fire up vi (or whatever editor you like) and enter it > > manally. Or run a dos2unix utility on the script on your Unix box to set > > it up and clear out those linefeeds. > > A simple command like "perl -i.bak -npe 's/\r\n/\n/g' filename" will > clear the linefeeds and even make a backup of the file. (It has never > failed me, but you'll never know) I sort of doubt that extra CARRIAGE RETURNs (CR not Linefeeds LF) in the file are what is causing his problems, but it may be. But, if you want to get rid of all those extra returns there is an easy way - use 'tr' This works well: tr -d "\r" < INPUTFILE > OUTPUTFILE If you ftp text from a DOS environment to a UNIX environmtent, then just set is to ASCII mode (type 'ascii' after the ftp session is connected) and it will take care of managing the extra characters very nicely with no other intervention needed. jerry > > -- > R > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: FreeBSD bootable floppy Script NOT WORKING
On Tue, Oct 22, 2002 at 08:28:22AM +0200, Roger 'Rocky' Vetterberg wrote: > perl -i.bak -npe 's/\r\n/\n/g' Pedant point of the day. Be careful of combining the -n and -p flags on the perl command line, as they mean contradictory things. '-n' is loop over all the lines of the input *without* printing then, whereas '-p' is loop over all the lines of the input and print them to stdout. The command as written will work, for as perlrun(1) says: A -p overrides a -n switch. but it would be better to write the command as: perl -i.bak -pe 's/\r\n/\n/g' Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: FreeBSD bootable floppy Script NOT WORKING
John Bleichert wrote: *snip* * EOM is not a command, it's an end-of-text marker, similar to the one used in Perl. * There are text-file incompatibilities between Unix and DOS. If you're copying/pasting the file from the website in Windows, ftp'ing it to a Unix box and then trying to run it, all those extra linefeeds may cause extremely bizzare errors. I hate to say it, but if you can only get the Internet on your winbox, you should probably fire up vi (or whatever editor you like) and enter it manally. Or run a dos2unix utility on the script on your Unix box to set it up and clear out those linefeeds. A simple command like "perl -i.bak -npe 's/\r\n/\n/g' filename" will clear the linefeeds and even make a backup of the file. (It has never failed me, but you'll never know) -- R To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: FreeBSD bootable floppy Script NOT WORKING
> > Ok, I'm frustrated out. Do people actually use this script because the only > one I find is the the one referenced from freebsd.org. > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html > #AEN14848 > > I cut and paste this script into a file in windows and then did a fetch from > my server. When my script run's into the EOM command I get problems. I am > running sh shell I think. > > cat << EOM > > I'm using FreeBSD 4.62 and EOM is just putting everything into one file. I > retyped everything and getting the same problem. So I don't know if it's > hidden characters or not. Is there a place to fetch this file! Because > I'm going crazy. I am not sure what all else is happening, but EOM here is not exactly a command. The sequence: cat > /mnt/etc/fstab < > Also is this bootable floppy suppose to let me see something because so far > all I get is a no /boot/loader. > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: FreeBSD bootable floppy Script NOT WORKING
On Mon, 21 Oct 2002, Terry Cooper wrote: > Date: Mon, 21 Oct 2002 14:22:31 -0700 > From: Terry Cooper <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: FreeBSD bootable floppy Script NOT WORKING > > Ok, I'm frustrated out. Do people actually use this script because the only > one I find is the the one referenced from freebsd.org. > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html > #AEN14848 > > I cut and paste this script into a file in windows and then did a fetch from > my server. When my script run's into the EOM command I get problems. I am > running sh shell I think. > > cat << EOM > > I'm using FreeBSD 4.62 and EOM is just putting everything into one file. I > retyped everything and getting the same problem. So I don't know if it's > hidden characters or not. Is there a place to fetch this file! Because > I'm going crazy. > > Also is this bootable floppy suppose to let me see something because so far > all I get is a no /boot/loader. > > * EOM is not a command, it's an end-of-text marker, similar to the one used in Perl. * There are text-file incompatibilities between Unix and DOS. If you're copying/pasting the file from the website in Windows, ftp'ing it to a Unix box and then trying to run it, all those extra linefeeds may cause extremely bizzare errors. I hate to say it, but if you can only get the Internet on your winbox, you should probably fire up vi (or whatever editor you like) and enter it manally. Or run a dos2unix utility on the script on your Unix box to set it up and clear out those linefeeds. That or use 'dd' as in my previous post :) Good luck! JB # John Bleichert # http://vonbek.dhs.org/latest.jpg To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: FreeBSD bootable floppy Script NOT WORKING
On Mon, 21 Oct 2002, Terry Cooper wrote: > Date: Mon, 21 Oct 2002 14:22:31 -0700 > From: Terry Cooper <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: FreeBSD bootable floppy Script NOT WORKING > > Ok, I'm frustrated out. Do people actually use this script because the only > one I find is the the one referenced from freebsd.org. > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html > #AEN14848 > > I cut and paste this script into a file in windows and then did a fetch from > my server. When my script run's into the EOM command I get problems. I am > running sh shell I think. > > cat << EOM > > I'm using FreeBSD 4.62 and EOM is just putting everything into one file. I > retyped everything and getting the same problem. So I don't know if it's > hidden characters or not. Is there a place to fetch this file! Because > I'm going crazy. > > Also is this bootable floppy suppose to let me see something because so far > all I get is a no /boot/loader. > Quick question - is there anything special about this script? I mean, wouldn't it just be easier to 'dd' a bootable floppy from one of the images on the install CDs? Sorry, I haven't used a floppy drive in years, but this seems like a lot to go through when 'dd' can do it for you. Unless, of course, there's something special about the disk this script creates. Good luck - JB # John Bleichert # http://vonbek.dhs.org/latest.jpg To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message