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
Shell script to create a link Shreedhar Naik Shell Programming and Scripting 3 05-22-2008 08:01 AM
interactive shell script to create users 10.4 tlarkin OS X (Apple) 3 03-27-2008 03:35 PM
shell script to create dirs sjajimi Shell Programming and Scripting 2 07-24-2007 08:34 AM
Shell script to create local homes Steve Adcock Shell Programming and Scripting 11 10-25-2004 05:18 AM
Shell script to create a DOS-like Menutiem bionicfysh Shell Programming and Scripting 2 06-17-2002 05:03 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 08-30-2005
maykap100 maykap100 is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 3
create a shell script

create a shell script that process a file

file contain

f2f_100.txt 1234 kkk 12345
f2f_101.txt 1234 mmm 11111
retire_200.txt 2222 rrr 22222
retire_201.txt 1112 qqr 12122


output needed

if first field is f2f then new file fb_$1 contain $2|$4
example filename should be fb_f2f_100.txt and it contains 1234|12345

if first field id retire then new file retire_fb contain $2|$4
example filename should be retire_fb_200.txt and it contains 1112|12122
 

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 09:53 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