-
-
Senior Member
registered user
Re: Variable problem
--Just so you know, most ppl on this board are probably using bash. (Unforch I don't know the answer to your question - but it does work now, right?)
--I looked in the man page for csh, and the variable for arguments passed to the script is " $* ", same as bash. What is "$#" supposed to be? If you're looking for the number of words in a variable, it would be $#varhere.

Originally Posted by
cborrero2000
I did a script for Red Hat Linux 8 and it worked perfect then I restarted my computer with KNOPPIX and I tried to run the script and is giving me the following problems:
1) The script doesn't work if I dont add to the first line -xv or just -.
Like that #!/bin/csh doesn't work
Like that #!/bin/csh -vx works, and just with the dash (-) it works too. #!/bin/csh -
Why is happened that? What can i do?
2) When the program get to execute an intruction with the variable $#, it says that this variable doesn't exist.
Should i use another variable to know if there's a parameter passed with the command line?
Thank you for the answers :P
Similar Threads
-
By SunnyB in forum General Support
Replies: 0
Last Post: 10-19-2004, 09:58 PM
-
By activeco in forum General Support
Replies: 2
Last Post: 09-04-2004, 08:55 PM
-
By Lex in forum General Support
Replies: 0
Last Post: 11-23-2003, 03:57 AM
-
By Triple Six in forum Hardware & Booting
Replies: 2
Last Post: 04-15-2003, 04:23 AM
-
By Guest in forum Customising & Remastering
Replies: 1
Last Post: 12-22-2002, 04:49 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM
$699.00

Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD
$119.99

Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB
$149.99

Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working
$149.99

NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER
$1499.97

Dell Poweredge C6400 24x 2.5’’ 2x 2400W 4x C6420 Nodes H330 | 2x SFP | 8x Trays
$799.99

LOT (8) Cisco UCS UCSB-B200-M5 2x6248R 24 core 3.0G 24x64g DDR4-2933 ram
$112000.00

Cisco B200 M3 2x E5-2670V2 10 Core 8x 16GB-128GB Ram Blade Server VIC1240 14900R
$399.00

HP ProLiant 460 Series G7 Blade 2x Xeon E5649 2.53Ghz w/ 16Gb DR3, No HD, QTY
$74.99

Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR
$96.60