The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bourne Shell script - log for users loggin on and off noodlesoup Shell Programming and Scripting 14 09-08-2006 11:30 PM
Bourne: How to invoke an alias from within a shell script techshots Shell Programming and Scripting 2 06-04-2006 01:38 AM
cd from a Bourne Shell Script - Please Help fawqati Shell Programming and Scripting 10 05-25-2006 04:26 AM
Bourne Shell Script dmhonor914 UNIX for Dummies Questions & Answers 2 12-10-2003 12:25 PM
bourne shell script psrinivas Shell Programming and Scripting 2 12-06-2001 03:38 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-24-2001
dezithug dezithug is offline
Registered User
  
 

Join Date: Oct 2001
Location: Los Angeles
Posts: 6
sure i can here it iz

PHP Code:
#!/bin/bash
count=1
val
=$2
op
=$1
ans
=0
if [ $op "-e" -o $op "-o" ]
then
     
if [ $op "-e" ]
     
then
     
while [ $count -le $val ]
     do
     
ans=`expr $count % 2`
          if [ 
$ans -eq 0 ]
          
then
          
echo "$count \c "
          
fi
        count
=`expr $count + 1`
     
done
     elif 
$op "-o" ]
     
then
     
while [ $count -le $val ]
     do
     
ans=`expr $count % 2
          if [ 
$ans -ne 0 ]
          
then
          
echo "expr $count \c "
          
fi
        count
=`$count + 1`
     
done
     fi
else
while [ 
$count -le $val ]
do
echo 
"$count \c "
count=`expr $count + 1`
done
fi
echo 
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0