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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix file operations(shell script) nivas Shell Programming and Scripting 6 02-07-2008 04:11 AM
File operations monks UNIX for Dummies Questions & Answers 2 04-26-2006 04:26 AM
File operations chiragmistry21 Shell Programming and Scripting 2 03-27-2006 02:00 PM
where i can find list of UNIX commands for daily operations ? mgoutham UNIX Desktop for Dummies Questions & Answers 1 03-02-2006 11:35 AM
mathematics operations in unix cesar720213 UNIX for Dummies Questions & Answers 2 11-22-2001 08:24 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 02-08-2008
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
Quote:
Originally Posted by nivas View Post
how to use this vb codes??
The quoted link explains the details.
For example to post your file2 content:


[code]
QWERTYUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906
[/code]
Reply With Quote
Forum Sponsor
  #9  
Old 02-08-2008
nivas
Guest
 

Posts: n/a
Unix File operations

Code:
QWERTYUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906
Reply With Quote
  #10  
Old 02-10-2008
nivas
Guest
 

Posts: n/a
Unix File operations

Please suggest some commands for my problem mensioned above.
Reply With Quote
  #11  
Old 02-10-2008
Registered User
 

Join Date: Jan 2008
Posts: 25
Try this...

I think below steps should help you to get resolution -

$cat f1.dat
QWERTYUI098765432112345
QWIUYTUI098765432112345
CDXRTYUI098765432112345

$cat f2.dat
QWERTYUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-
10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906
QWERTYUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-
10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906
QWERTYUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-
10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906

$cut -c25- f2.dat > out1.txt

$paste f1.dat out1.txt
QWERTYUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-
10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906
QWIUYTUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-
10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906
CDXRTYUI098765432112345 abc@soft.com 2007-09-260012275.80 0000924 00245.00 2007-
10-25ASDFRESS,POIU S 000000000000015.52 000000000000000.00 CBB00010000000906
Reply With Quote
  #12  
Old 02-10-2008
Registered User
 

Join Date: Jan 2008
Posts: 328
Why have you posted the same question in two threads? I just finished posting a reply in the other thread and here you already are getting replies in this thread. But here your data is different? Whatever....
Reply With Quote
  #13  
Old 02-11-2008
nivas
Guest
 

Posts: n/a
Unix File operations

This solution will cut the 1st column in file 2 and append the file1 with file2 1st culumn.


But i need to take the file1 and search the lines in file2 1st column, if it matches, then it should take that line alone and write in to a seperate file.


Thanks for your precious time.
Reply With Quote
  #14  
Old 02-11-2008
nivas
Guest
 

Posts: n/a
Unix File operations

Actually KavinADC,

For long time that thread was not replied by any users,so i cretaed a new one stating a clear description o f the problem.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0