The UNIX and Linux Forums  


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



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

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #22 (permalink)  
Old 12-01-2009
Registered User
 

Join Date: Mar 2007
Posts: 15

Code:
cat -vte temp.txt
1^I^I123^I12 34^I1$
A^IAB^IABC^IABDC^Ie$

  #23 (permalink)  
Old 12-01-2009
radoulov's Avatar
--
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 3,074
So why are you expecting a different output?
In the config file you posted the third filed should start at position 5 ...

Last edited by radoulov; 12-01-2009 at 12:14 PM..
  #24 (permalink)  
Old 12-01-2009
Registered User
 

Join Date: Mar 2007
Posts: 15
My mistake radalouv. I apolgise. I had changed the config files in IBM and HP and hence was getting diff outputs. Your code is PERFECT.
I have tested the code in both IBM and HP and it works fine.
Hopefully it'll work in SUN as well.

Thanks a tonne for your help.
You are a life saver.
  #25 (permalink)  
Old 12-01-2009
radoulov's Avatar
--
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 3,074
Quote:
Originally Posted by subhrap.das View Post
[...]
Hopefully it'll work in SUN as well.
[...]
On Solaris you should use nawk or /usr/xpg4/bin/awk.
Sponsored Links
Reply

Bookmarks

Tags
position word shell

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Paste a word in the third field position of a file girish.raos UNIX for Dummies Questions & Answers 1 08-17-2009 07:49 AM
need a cmd to search starting word revenna Shell Programming and Scripting 1 12-11-2008 03:38 AM
How to check a word position in a file ? tibo Shell Programming and Scripting 7 01-04-2008 02:20 AM
Change Position of word character cedrichiu Shell Programming and Scripting 6 03-12-2007 01:52 AM
Can a shell script pull the first word (or nth word) off each line of a text file? tricky Shell Programming and Scripting 5 08-17-2006 07:29 AM



All times are GMT -4. The time now is 12:31 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