The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
rsh script with inside a for loop trekianov Shell Programming and Scripting 5 12-06-2008 12:39 PM
Script not executing second loop thumper Shell Programming and Scripting 2 05-07-2008 05:10 PM
Problems with an if/then loop within a script lodey Shell Programming and Scripting 3 09-18-2007 03:45 AM
script to loop around folders grinder182533 Shell Programming and Scripting 2 11-14-2006 08:46 AM
If then else loop in Shell script pankajkrmishra Shell Programming and Scripting 4 07-31-2006 10:40 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-09-2004
moxxx68's Avatar
moxxx68 moxxx68 is offline
Registered User
  
 

Join Date: Mar 2004
Posts: 301
Thumbs up not quite sure how to loop this script!

can anyone tell me how to make this script continue after the *)
I have been reading C and shell scripting and am confused.. I tried to impliment a while (1) and a continue after the *) but I keep getting end of file error..! also there a few different loops that I am not sure which type to use.

# !/bin/sh
# .file_manager

function usage () { echo "choose from named parameters ... txt or Txt, loc or Loc, fle or Fle,fls or Fls,E or e"; echo "capital for text, lowercase for directories
and files"; echo "Exec & EXEC only uppercase..!"; }


usage
read type
case $type in
Txt) ls -ali -R . | grep -nB2 "(Txt)" * |less
break;
;;
Loc) ls -ali -R . | grep -nB2 "(Loc)" * | less
break;
;;
Fle) ls -ali -R . | grep -nB2 "(Fle)" * | less
break;
;;
Fls) ls -ali -R . | grep -nB2 "(Fls)" * | less
break;
;;
E) ls -ali -R . | grep -nB2 "(E)" * | less
break;
;;
Exec) ls -ali -R . | grep -nB2 "(Exec)" * | less
break;
;;
EXEC) ls -ali -R . | grep -nB2 "(EXEC)" * | less
break;
;;
txt) ls -ali -R . | grep -n 'txt' | less
break;
;;
loc) ls -ali -R . | grep -n 'loc' | less
break;
;;
fls) ls -ali -R . | grep -n 'fls' | less
break;
;;
fle) ls -ali -R . | grep -n 'fle' | less
break;
;;
e) ls -ali -R . | grep -n 'E' | less
;;
*)echo "error no such usage choice"
usage
esac
would appreciate..
thanx moxxx68
 

Bookmarks

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