LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 12-10-2002, 10:46 PM   #1
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Guys and girls, laugh at me!!!


A friend of mine asked me for assistance with his perl class, a little script to find a specified pattern in the list of files, so nothing fancy - a minute to write
Code:
#!/usr/bin/perl -w
$i  = 1;
$parnum = @ARGV;
$pattern = $ARGV[0];
while ($i < $parnum) { 
open(FHANDLE, $ARGV[$i]);
while (<FHANDLE>) { 
print if /$pattern/;
}
close (FHANDLE);
$i++;
}
And it didn't work, so I rewrote it differently and it didn't work either, after a couple of cigarettes, I opened up [lol]cmd[/lol] and issue which perl and get a usual blurb on NT about not knowing what the heck is which, still under influence I paused for a second or two, and then realized it ain't *NIX, lol.
 
Old 12-11-2002, 12:25 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
ba ha ha ha, poor guy! That's funny. You toss a few back too, or was it just truly obliviousness?



Cool
 
Old 12-11-2002, 02:45 AM   #3
KnightAbel
Member
 
Registered: Sep 2002
Location: Kaysville, UT USA
Distribution: Red Hat Linux, Slackware
Posts: 242

Rep: Reputation: 30
hehehe. Why can't the whole world just run linux?
 
Old 12-12-2002, 04:12 AM   #4
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
Ye, I have noticed I do similar things. For instance, in linux i'm use to selecting a text and being able to past it with the middle mouse button. So when i'm at school I sometimes want to do the same thing, only now it does not work because .... you have guest it, they use windows.
 
Old 12-12-2002, 09:13 AM   #5
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 63
I installed Cygwin solely so that I could have some bash functionality under Windows, but your grime Schatoor is something that I keep moaning about! Wouldn't it be good if someone had written a little util that sits in the background and does stuff like this, making it easier? It could also be used to ease people into the *nix way of doing stuff, too!
 
Old 12-12-2002, 11:09 PM   #6
rufius
Member
 
Registered: Oct 2002
Location: Miami, FL
Distribution: Ubuntu
Posts: 184

Rep: Reputation: 30
In the short time I've used linux, even so, I've caught myself at school opening up a CL and typing "su" then trying to enter my password when DOS kindly informs me that I've entered an "Invalid Command". Its great though, my friends ask me what the hell I'm doing when I bring my linux box up to school to mess with in the lab. They think I'm insane, I just tell them *nix lol.
 
Old 12-12-2002, 11:45 PM   #7
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Original Poster
Rep: Reputation: 56
I should've clarified, perl is installed on my body's NT box, which is a bit awkward I find - running perl scripts on NT isn't fun at all, the problem wasn't the #! b/c NT just ignored it as a comment, the problem was that I got sort of no such file or directory - I've forgotten what the error called on win* boxes, you see the script usage is
script "pattern" file1 file2 file3, and all the files were in another *folder* and I used / instead of \ which is awkward in itself. Well, he is taking a UNIX class, so I am converting him to RedHat.
Lol, I should've known better the other day I was helping the same guy with a C++ program, and right away w/o even thinking I pressed windows key+r and typed cmd after getting the DOS prompt I issued emacs&
Yay, *NIX is addictive but I can't learn that other shitware called windows w/o shades.
 
Old 12-20-2002, 12:28 PM   #8
bkeating
Member
 
Registered: Mar 2002
Location: San Francisco, CA
Distribution: Open/FreeBSD, Gentoo, SuSE
Posts: 511

Rep: Reputation: 38
ROFLMFAO

Actaully, i know nothing of perl... er anything other then php. Even your small snippet of code is greek to me.



Idunno why im even posting this... (bored day at work)
 
Old 12-24-2002, 03:42 AM   #9
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 56
What we need is a small chip (running linux of course) implanted under the skin that says "Beware!!! Voleware!!!" whenever you encounter a dos box.
 
Old 12-26-2002, 09:17 AM   #10
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Rep: Reputation: 30
I spend my days fixing windows boxes, or attemping to at least, and I don't know how many times a day I type "ls" "man" "grep" and many others, oh if only all would go to linux.

However on the brighter side, my new job I got about 6 months ago let me install a linux server and have my own linux workstation there I love that.
 
Old 12-26-2002, 06:06 PM   #11
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
He, what of we had a bash for windows?
What i'm thinking of is a command prompt just like bash. Commands like "ls" would be executebles in some file like "c:\windows\bash". It realy shoulden't be to hard to program.
And imagin if you could also cd in to you linux file system so you could easely move files for and to you linux partitions.
 
Old 12-26-2002, 07:32 PM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
Well cygwin already does that. You just have to be in the cygwin environment.

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I need some C++ guys/girls, small project karlan Linux - General 2 09-08-2004 07:37 AM
Guys/Girls I need your help with redhat mail server CYRUSS612 Linux - General 2 03-20-2004 11:13 AM
Guys and girls take a good laugh!!! neo77777 General 3 11-17-2003 08:20 PM
girls?? arunshivanandan General 93 10-01-2003 12:05 PM
Guys and girls I need advice neo77777 General 12 05-09-2003 07:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration