The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Set prompt, problems and tricks HybridLogic UNIX for Dummies Questions & Answers 6 09-26-2007 08:05 PM
A couple of grub questions. akbar Debian 1 03-06-2007 12:41 AM
tar tricks neked UNIX for Advanced & Expert Users 2 08-14-2006 03:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-23-2008
JamesByars JamesByars is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 124
need couple of ksh tricks please

1) I ran myScript with 2 arguments, I meant to use 3
if I do r my, it will rerun it with the 2 arguments. is there a way I can do r my and add a third argument at the end?

2) say I did

Code:
myAcript.ksh 2 5 7 8
I realise my typo. is there an easy way to redo the command replacing A with S?

thanks
  #2 (permalink)  
Old 02-23-2008
hanny hanny is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 3
You can use vi commands to edit the line, Google on "vi commands".

Cheers
  #3 (permalink)  
Old 02-23-2008
sapan123 sapan123 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 39
need couple of ksh tricks please

You can use

sed in your syntax so that it wil edit what ever things you want to do
  #4 (permalink)  
Old 02-23-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
vi commands work only if vi mode is on. I use emacs mode. You them them on with one of:
set -o vi
set -o emacs
But by default neither is on.
  #5 (permalink)  
Old 02-23-2008
JamesByars JamesByars is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 124
thanks all
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 05:59 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