Search Results

Search: Posts Made By: Reddoug
1,231
Posted By Reddoug
Hi Thanks for the info. I will check it out and...
Hi
Thanks for the info. I will check it out and see if I can get it straight how it works.

Doug
1,231
Posted By Reddoug
Variables question
Hi

I am trying to find were to look for definitions of these variables; $0, $1, $2, $#, $$ , $*. I am not having much luck with my searching. Can anyone point me in the right direction?

Thanks,...
887
Posted By Reddoug
Variables
Hi All

Trying to get a better handle on variables. ie how $1, $2, $3... are used. I have tried searching this site without much luck. When it would be used in [ $1 = -d ] how is $1 used in a...
12,726
Posted By Reddoug
Hi Found my solution. #!/bin/sh if [ $1 =...
Hi
Found my solution.
#!/bin/sh
if [ $1 = -d ]
then
ls -l | grep "^d" | wc -l
exit
fi
Type the name of the file and add -d will output the number of directories
.
Thanks, Red
12,726
Posted By Reddoug
Hi I tried using code from bottom code box....
Hi

I tried using code from bottom code box. When I executed code, I got and error 3: syntax error "(" unexpected. I tried using back ticks, no errors but did not have any output. I also tried...
12,726
Posted By Reddoug
Hi and thanks for the reply's. I am using vi...
Hi and thanks for the reply's. I am using vi editor and trying to create a script using if statements. I will see what I can do with the suggestions.

Thanks, Red



---------- Post updated at...
12,726
Posted By Reddoug
vi and if statements
Hi

I am very new to Unix programming and shell scripting. I am trying t figure out how to write a little script that will output the number of directories. I can find the number of directories...
Showing results 1 to 7 of 7

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