Technology from my perspective

Wednesday, December 12, 2012

A text modifier script

The task was to
1. get the first letter of the second column and complete third column of a text file
2. convert everything to lower case
3. Combine them to form a single word

So I did the following

cat file1 | awk '{print $2}' | cut -c1 | tr '[A-Z]' '[a-z]' > first
cat file1 | awk '{print $3}' | tr '[A-Z]' '[a-z]' > second
paste first second | awk '{print $1$2} > merged
Posted by ModMani at 1:41 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2012 (27)
    • ▼  December (24)
      • apache2+fcgi+redmine
      • Nagios with oreon ???? --on fly
      • Oracle migration tips
      • logical volume creation
      • server migration -Tips and notes
      • rsync from *nx machine to windows machine
      • sieve filtering Howto
      • rm to mp3 conversion using lame
      • openvpn how to
      • Multigateway routing in debian
      • Sample TC config for BW control using HTB
      • disk copy with dd
      • Adding hours in M$ excel
      • A text modifier script
      • nested if example in excel
      • Backdating VMWare guest system
      • VMWare guest OS :- memory access violation error
      • Batch migration using imap sync
      • Batch migration using imap sync
      • Increasing the swap size of the machine
      • Disable Oracle's password expiry
      • cert7 file generation
      • Six skills for CIOs
      • Batch Script for editing something in a file in DOS
    • ►  March (3)

About Me

ModMani
View my complete profile
Simple theme. Powered by Blogger.