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
ispell-fo 0.2.33 (Default branch) iBot Software Releases - RSS News 0 07-07-2008 07:10 PM
ispell-da 1.6.14 (Default branch) iBot Software Releases - RSS News 0 05-30-2008 11:10 AM
ispell-da 1.6.13 (Default branch) iBot Software Releases - RSS News 0 04-24-2008 05:00 AM
ispell-da 1.6.12 (Default branch) iBot Software Releases - RSS News 0 03-18-2008 08:10 AM
ispell hassan2 SuSE 1 08-26-2004 01:36 AM

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 08-04-2008
negzero7 negzero7 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 2
quick ispell help

Hi, I am trying to write a script that calls ispell (my linux version doesn't have aspell) on a file and runs from there. Pretty much looks like this at the beginning:


Code:
#!/bin/bash
# script that will spell check a file


read -p "Enter a file name: " fileName

ispell fileName

I just want this to prompt for a filename, then run ispell on that file. Also note that I do know you can just type $ ispell file and it will run, but I want it to run this way. Any help for this beginner?
  #2 (permalink)  
Old 08-04-2008
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380
Quote:
Originally Posted by negzero7 View Post
my linux version doesn't have aspell

You can install aspell on any version of Linux.
Quote:
Code:
#!/bin/bash
# script that will spell check a file


read -p "Enter a file name: " fileName

ispell fileName


Code:
read -ep "Enter a file name: " fileName
ispell "$fileName"

  #3 (permalink)  
Old 08-04-2008
negzero7 negzero7 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 2
oh I see, I needed to clarify filename...quick question, I had -p and you changed it to -ep, whats the difference?
  #4 (permalink)  
Old 08-04-2008
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380
Quote:
Originally Posted by negzero7 View Post
I had -p and you changed it to -ep, whats the difference?

Code:
$ help read
  ...
  If -e is supplied and the shell is interactive, readline is used to obtain the line.
  ...

It enables editing of the line as it is being input.
Closed Thread

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 07:59 AM.


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