Search Results

Search: Posts Made By: alexstar
3,647
Posted By john1212
try: #!/bin/sh #a=$# #number or...
try:
#!/bin/sh

#a=$# #number or parameters
b=0 #starting counter

while [ $# -gt $b ]
do
b=`expr $b + 1`
echo $b
echo "Parameter is $[$b]"
done
3,647
Posted By frank_rizzo
john1212 - while [ $# > $b ] is incorrect. as...
john1212 - while [ $# > $b ] is incorrect. as scottn already stated > is a redirection operator. use -gt.
3,647
Posted By felipe.vinturin
This is because you edited/created in a Windows...
This is because you edited/created in a Windows environment and every row has a Line Feed and a CR.

The command to remove this is:

dos2unix <FileName>


Just one more comment, if you want...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 08:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy