PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Printing all arguments pbutted to a bash script 2473


Your Ad Here

Your Ad Here

what is going on with my usb and my HP printer
Hi, I am on ubuntu dapper. I have bought HP Photosmart C4180 printer. I want to install drivers...

Well, it is not the same. To see why, test each one with an argument that contains at least one space.

Here is a test script to show the difference:

OT Scoville has had 72 anonymous Google accounts
Bet this clown thinks that we believe he is a female because he characteristics of trolls: They think that everyone believes...

######################################################## #!-bin-bash

echo echo "Default method" Count=0 for arg do Count=$(( $Count + 1 )) echo "Parameter $Count = '$arg'" done

echo echo '"$*" method' Count=0 for arg in "$*" do Count=$(( $Count + 1 )) echo "Parameter $Count = '$arg'" done

echo Count=0 do Count=$(( $Count + 1 )) echo "Parameter $Count = '$arg'" done

echo echo '$* method' Count=0 for arg in $* do Count=$(( $Count + 1 )) echo "Parameter $Count = '$arg'" done ########################################################

$ tmp-list-args.sh a b c d e 'f g' h

Default method Parameter 1 = 'a' Parameter 2 = 'b' Parameter 3 = 'c' Parameter 4 = 'd' Parameter 5 = 'e' Parameter 6 = 'f g' Parameter 7 = 'h'

"$*" method Parameter 1 = 'a b c d e f g h'

Parameter 1 = 'a' Parameter 2 = 'b' Parameter 3 = 'c' Parameter 4 = 'd' Parameter 5 = 'e' Parameter 6 = 'f g' Parameter 7 = 'h'

$* method Parameter 1 = 'a' Parameter 2 = 'b' Parameter 3 = 'c' Parameter 4 = 'd' Parameter 5 = 'e' Parameter 6 = 'f' Parameter 7 = 'g' Parameter 8 = 'h'

-- Asking for technical help in newsgroups? Read this first:



Your Ad Here

List | Previous | Next

what is going on with my usb and my HP printer

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Printing all arguments pbutted to a bash script 2472