-
-
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

Crucial MX500 1TB 2.5" SATA III Internal SSD CT1000MX500SSD1
$99.99

Samsung 2.5" 870 EVO SSD SATA III 250GB 500GB 1TB Internet Solid State Drive Lot
$90.00

Samsung 860 EVO 250GB SSD MZ-76E250 2.5" SATA III Solid State Drive -
$39.99

Samsung New SSD 970 EVO Plus 2TB 1TB 500GB 250GB NVMe M2 Internal Hard Drive Lot
$79.99

Netac 2TB 1TB 512GB 256GB Internal SSD 2.5inch SATAIII Solid State Drive lot
$549.00

Fanxiang 1/2/5/10Pcs 2.5'' SATA SSD Lot 1TB 2TB 4TB 512GB 256GB TLC Internal SSD
$129.99

Micron 1300 MTFDDAK256TDL 256 GB SATA III 2.5 in Solid State Drive
$24.99

2 PACK 128 GB SSD M.2 2280 SATA Solid State Drive Major Brands, Samsung, LiteON
$28.00

SSD 2.5" SATA Hard Drive for Laptop Desktop Windows 10 pro 64 Pro Pre-installed
$42.00

Micron MTFDDAK256TBN 256 GB, Internal ,2.5" SSD
$23.00