03-22-2002
Textual oddity
This is my first post!! I really hope this question hasn't been asked a thousand times before(I'll bet it has).
Anyway, here it is. I am new to the UNIX world by the way so forgive my ignorance. OK, whenever I write code on my windows machine and then try to port it over to UNIX I always get some bizarre newline character problems. So my question is how does the UNIX world represent the newline character exactly? Its \n in Windows. I know this is a dumb question hehe.
Also, if anyone knows why exactly emailing text files using MS Outlook to UNIX causes so many porting problems that would be helpful as well.
Thanks in advance!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am a completely newby in this forum and a completely newby in Unix too. I have searched this question before I posted it to this forum, but forgive me if it was previously answered! :)
My question is simple. I have a Unix K-shell that receives an argument. But this argument is always between... (2 Replies)
Discussion started by: lvalero
2 Replies
2. UNIX for Dummies Questions & Answers
Hello Forum,
I am having an odd occurence. When i do a su in a terminal or console session, I am able get authenticated as superuser without using the full or correct root password. Anyone have any idea?
-AJ (4 Replies)
Discussion started by: jacobsa
4 Replies
3. UNIX for Dummies Questions & Answers
I am using smartFTP client on my windows machine to connect to a linux box of mine (different location) to download some large files 100+meg. The linux box is running vsftp.
After several minutes of downloading, the connection suddenly dies, and I cannot reconnect to the box via FTP using ANY... (7 Replies)
Discussion started by: Spetnik
7 Replies
4. AIX
Hi,
I have a strange problem. we're trying to connect an IBM pseries, to a Brocade switch, for SAN acess, using a badged emulex card, (IBM FC6239) WE can configure the device to see the fabric. The only problem we have is that the Brocade sees the HBA as storage, and not as a HBA.
We've zoned... (1 Reply)
Discussion started by: praxis22
1 Replies
5. UNIX for Dummies Questions & Answers
I discovered that where 'tr -s' works as expected on grepped input, it appears to completely fail on dig results.
I am not sure if this is because of some sort of non posix compliancy, or what.
Here is what I did:
The command below works as expected, squeezing all repeated spaces to a single... (3 Replies)
Discussion started by: bdmeyersc
3 Replies
6. BSD
Our webserver is running FreeBSD, for the last few days we have been having an issue with our cronjobs/mysql server.
Specifically we have jobs that execute php scripts to do various things to the website. When running these php scripts manually, via external browser, or lynx on the server, they... (8 Replies)
Discussion started by: mrfr0g
8 Replies
7. Solaris
All,
I'm baffled by some sort behavior on SunOS 5.10 and looking for guidance.
Running the command:
sort -t'|' -k5,5 -k7,7 -k1,1 -k2,2 -k3,3 -k6,6 -k8,8 test
Against the file "test":
thirdA||||first||second|Data
thirdB||||first||second|
thirdC||||first||second|Data... (11 Replies)
Discussion started by: effigy
11 Replies
8. Shell Programming and Scripting
Hi,
Does anyone know of any permission bit "translator"? One that can translate the permission bit from its textual value to its octal value and vice versa. It is alright if it is always just rwx but on a lot of occasions nowadays, getting a lots of s, S, t, etc.
-rwxrwxrwx 1 oracle dba... (4 Replies)
Discussion started by: newbie_01
4 Replies
9. UNIX for Dummies Questions & Answers
I have to apologize for my ignorance so this question is probably stupid.
How does awk process a file? Does it read from top of input file to end of file going line by line?
Yoda helped me create an awk script that helps me parse the named.conf file and output it into a .csv file but when... (8 Replies)
Discussion started by: djzah
8 Replies
10. Shell Programming and Scripting
Hi all, I'm trying to use bash to create a basic parser for some text, because basic grep/sed/awk have all my needs covered.
So, I'm creating the chain of grep/sed I need and trying the execute that on the data I gather.
The problem is, it's not working as it does when hardcoded.
e.g.
... (3 Replies)
Discussion started by: beomagi
3 Replies
BJ(6) Games Manual BJ(6)
NAME
bj - the game of black jack
SYNOPSIS
/usr/games/bj
DESCRIPTION
Bj is a serious attempt at simulating the dealer in the game of black jack (or twenty-one) as might be found in Reno. The following rules
apply:
The bet is $2 every hand.
A player `natural' (black jack) pays $3. A dealer natural loses $2. Both dealer and player naturals is a `push' (no money exchange).
If the dealer has an ace up, the player is allowed to make an `insurance' bet against the chance of a dealer natural. If this bet is
not taken, play resumes as normal. If the bet is taken, it is a side bet where the player wins $2 if the dealer has a natural and
loses $1 if the dealer does not.
If the player is dealt two cards of the same value, he is allowed to `double'. He is allowed to play two hands, each with one of
these cards. (The bet is doubled also; $2 on each hand.)
If a dealt hand has a total of ten or eleven, the player may `double down'. He may double the bet ($2 to $4) and receive exactly one
more card on that hand.
Under normal play, the player may `hit' (draw a card) as long as his total is not over twenty-one. If the player `busts' (goes over
twenty-one), the dealer wins the bet.
When the player `stands' (decides not to hit), the dealer hits until he attains a total of seventeen or more. If the dealer busts,
the player wins the bet.
If both player and dealer stand, the one with the largest total wins. A tie is a push.
The machine deals and keeps score. The following questions will be asked at appropriate times. Each question is answered by y followed by
a new line for `yes', or just new line for `no'.
? (means, `do you want a hit?')
Insurance?
Double down?
Every time the deck is shuffled, the dealer so states and the `action' (total bet) and `standing' (total won or lost) is printed. To exit,
hit the interrupt key (DEL) and the action and standing will be printed.
BJ(6)