LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-29-2011, 11:33 AM   #1
hd_pulse
Member
 
Registered: Dec 2010
Posts: 35

Rep: Reputation: 0
what does $# means?


Hello,
I came across a code where it was written something this:

Quote:
if [ $# -eq 0 ]
what does $# means?

Also what is the function of cmp command ? I googled but could'nt understand the explanation. Syntaxes for it.?
 
Old 05-29-2011, 11:37 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
For the first: http://tldp.org/LDP/abs/html/internalvariables.html.

Last edited by Nylex; 05-29-2011 at 11:39 AM.
 
Old 05-29-2011, 01:19 PM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
From man cmp:
Code:
NAME
       cmp - compare two files byte by byte

SYNOPSIS
       cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]
Example:
Code:
$ cat > file1
hello world
$ cat > file2
hello word
$ cmp -b file1 file2
file1 file2 differ: byte 10, line 1 is 154 l 144 d
what exactly is not clear?
 
  


Reply



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
What does it means? lavluda Debian 5 03-01-2006 08:28 AM
Anybody know what this means ?? raffigee Linux - Newbie 9 02-17-2006 11:33 PM
Help what does it means.. jhar Linux - Newbie 1 02-16-2005 01:44 AM
Could someone please tell me what this means!!!!! brianm Programming 1 03-27-2001 10:05 PM

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

All times are GMT -5. The time now is 05:01 PM.

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