Sponsored Content
Top Forums UNIX for Dummies Questions & Answers I want some selected data from first file and put into other file in specified format Post 302310257 by angad.makkar on Friday 24th of April 2009 07:05:27 AM
Old 04-24-2009
Lightbulb Try This:

Code:
#!/bin/sh

i=0
cat input | while read line
do
   case $i in
      0) str1=`echo $line | awk -F'#' '{print $2}'`;;
      1) str2=`echo $line | awk -F'ON' '{print $2}'`;;
      2) str3=`echo $line | awk -F'AT' '{print $2}'`;;
      3) str4=`echo $line | awk -F'PRIORITY' '{print $2}'`;;
      4) i=0;
         str=`echo $str1 \| $str2 \| $str3 \| $str4`;
         echo $str;;
   esac
   i=`expr $i + 1`
done

Output:
JOBCOUNT | EVERYDAY | 0000 | 50
JOBCOUNT | EVERYDAY | 0001 | 29
JOBCOUNT | EVERYDAY | 0002 | 40

Hope this helps.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to copy data file from UNIX and put it on PC

Hello, My customer wants me to copy a data file from his UNIX box, and transfer to windows basic PC. My question is how can I find the file in UNIX box, copy it out into DOS/Windows format. Please help. Thanks (3 Replies)
Discussion started by: BillyT
3 Replies

2. Shell Programming and Scripting

Read a file and put it in HTML format

Hi, I have one file as follows and I need to read this file contents in an HTML format. And send html file to some mail ids using sendmail. Communications Pvt Ltd Report AccountId Name Code IdBill Balance ... (3 Replies)
Discussion started by: Kattoor
3 Replies

3. UNIX for Advanced & Expert Users

filter last 24 hour data and put in new file

i have file server 1 (filesvr01acess.log) and disc server 1 (discsvr01acess.log) in unix box(say ip adress of the box 10.39.66.81) Similiarly i have file server 2 (filesvr01acess.log) and disc server 2(discsvr01acess.log) in another unix box(say ip adress of the box 10.39.66.82). Now my... (1 Reply)
Discussion started by: nripa1
1 Replies

4. Shell Programming and Scripting

split input data file and put into same output file

Hi All, I have two input file and need to generate a CSV file. The existing report just "GREP" the records with the Header and Tailer records with the count of records. Now i need to split the data into 25 records each in the same CSV file. id_file (Input file ) 227050994 232510151... (4 Replies)
Discussion started by: rasmith
4 Replies

5. Shell Programming and Scripting

Get Data From CSV File and put into a txt file

Hi Guys, File A I have File A as CSV Format.... No R SS MK Par value S AL A1 PKL123 Lo12 1 S AL A2 PKl123 Lo34 22 S AL A3 PkLK234 Lo67 -34 S AL A4 PkLK235 Lo09 120 S AL A5 PkLK236 Lo76 19 S AL A6 PkLK237 Lo44 -17 S AL A7 PkLK238 Lo90 2 S AL A8 PkLK239 Lo34 -9 I want file B like... (4 Replies)
Discussion started by: asavaliya
4 Replies

6. Shell Programming and Scripting

Read file and get the data then put it in array

Hi, I have a file called "readfile" it contains below parameters #cat readfile word=/abc=225,/abc/cba=150 three=12 four=45 five=/xyz/yza likewise multiple line. From the above file, I have to read "word" output should be like, /abc /abc/cba these values need to be put in... (3 Replies)
Discussion started by: munna_dude
3 Replies

7. Shell Programming and Scripting

Formatting data to put it in the excel file

Hello, I have a file with the below contents : Policy Name: Backup_bkp Policy Type: Catalog_bkp Active: yes Effective date: 08/07/2013 02:02:12 Mult. Data Streams: no Client Encrypt: no Checkpoint: no Policy Priority: ... (11 Replies)
Discussion started by: rahul2662
11 Replies

8. Shell Programming and Scripting

How to grep/sed selected data from a command or file?

Below is the output of a DB2 command. Now I have 2 requirements... Database Partition 0 -- Database TESTDB1 -- Active Standby -- Up 213 days 02:33:07 -- Date 02/22/2016 17:04:50 HADR Information: Role State SyncMode HeartBeatsMissed LogGapRunAvg (bytes) Standby ... (2 Replies)
Discussion started by: rlokesh27
2 Replies

9. Shell Programming and Scripting

Visit site get data and put in file for use.

I need to go to "vpnbook"vpnbook.com on the web (can't put in name yet)and open "Openvpn" tab On that page I need to get the username:vpnbook and the next line password:???????? I need to put those two in line one and two of a file "pwfile" When I have those I need to open openVPN with the... (1 Reply)
Discussion started by: tytower
1 Replies

10. Shell Programming and Scripting

Extract data from a log file and put it in a file

Hi, I would like to seek your help for a script that will extract data from log file and put it in a file. Sample log file 2018-10-23 12:33:21 AI ERROR -- tpid: SAMPLE_TH account: 123456789 aiSessionNumber: 660640464 mapName: xxx to yyy errorDesc: Translation Error:ErrorNumber : 993 ... (2 Replies)
Discussion started by: neverwinter112
2 Replies
DateTime::Locale::bn_BD(3)				User Contributed Perl Documentation				DateTime::Locale::bn_BD(3)

NAME
DateTime::Locale::bn_BD SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'bn_BD' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Bengali Bangladesh. DATA
This locale inherits from the DateTime::Locale::bn locale. It contains the following data. Days Wide (format) XXXXXX XXXXXXXX XXXXXX XXXXXXXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (format) XXX XXXXX XXX XXXXXXXX XXXXX XXX XXX Narrow (format) XX X XX XX XX X X Wide (stand-alone) XXXXXX XXXXXXXX XXXXXX XXXXXXXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XXX XXXXX XXX XXXXXXXX XXXXX XXX XXX Narrow (stand-alone) XX X XX XX XX X X Months Wide (format) XXXXXXXXX XXXXXXXXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXXXXX XXXXXXX XXXXXXX XXXXXXXX Abbreviated (format) XXXXXXXXX XXXXXXXXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXXXXX XXXXXXX XXXXXXX XXXXXXXX Narrow (format) XX XX XX X XX XXX XX X XX X X XX Wide (stand-alone) XXXXXXXXX XXXXXXXXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXXXXX XXXXXXX XXXXXXX XXXXXXXX Abbreviated (stand-alone) XXXXXXXXX XXXXXXXXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXXXXX XXXXXXX XXXXXXX XXXXXXXX Narrow (stand-alone) XX XX XX X XX XXX XX X XX X X XX Quarters Wide (format) XXXXX XXXXXXXXX XXXXXXXX XXXXXXXXX XXXXXX XXXXXXXXX XXXXXX XXXXXXXXX Abbreviated (format) XXXXXXXXX X XXXXXXXXX X XXXXXXXXX X XXXXXXXXX X Narrow (format) X X X X Wide (stand-alone) XXXXX XXXXXXXXX XXXXXXXX XXXXXXXXX XXXXXX XXXXXXXXX XXXXXX XXXXXXXXX Abbreviated (stand-alone) XXXXXXXXX X XXXXXXXXX X XXXXXXXXX X XXXXXXXXX X Narrow (stand-alone) X X X X Eras Wide BCE CE Abbreviated XXXXXXXXXX XXXXXXXXX Narrow XXXXXXXXXX XXXXXXXXX Date Formats Full 2008-02-05T18:30:30 = XXXXXXXX, 5 XXXXXXXXXXX, 2008 1995-12-22T09:05:02 = XXXXXXXX, 22 XXXXXXXX, 1995 -0010-09-15T04:44:23 = XXXXXX, 15 XXXXXXXXXX, -10 Long 2008-02-05T18:30:30 = 5 XXXXXXXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXXXX, -10 Medium 2008-02-05T18:30:30 = 5 XXXXXXXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXXXX, -10 Short 2008-02-05T18:30:30 = 5/2/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/9/-10 Default 2008-02-05T18:30:30 = 5 XXXXXXXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXXXX, -10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 XXXXXXX UTC 1995-12-22T09:05:02 = 9:05:02 XXXXXXXXX UTC -0010-09-15T04:44:23 = 4:44:23 XXXXXXXXX UTC Long 2008-02-05T18:30:30 = 6:30:30 XXXXXXX UTC 1995-12-22T09:05:02 = 9:05:02 XXXXXXXXX UTC -0010-09-15T04:44:23 = 4:44:23 XXXXXXXXX UTC Medium 2008-02-05T18:30:30 = 6:30:30 XXXXXXX 1995-12-22T09:05:02 = 9:05:02 XXXXXXXXX -0010-09-15T04:44:23 = 4:44:23 XXXXXXXXX Short 2008-02-05T18:30:30 = 6:30 XXXXXXX 1995-12-22T09:05:02 = 9:05 XXXXXXXXX -0010-09-15T04:44:23 = 4:44 XXXXXXXXX Default 2008-02-05T18:30:30 = 6:30:30 XXXXXXX 1995-12-22T09:05:02 = 9:05:02 XXXXXXXXX -0010-09-15T04:44:23 = 4:44:23 XXXXXXXXX Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXX, 5 XXXXXXXXXXX, 2008 6:30:30 XXXXXXX UTC 1995-12-22T09:05:02 = XXXXXXXX, 22 XXXXXXXX, 1995 9:05:02 XXXXXXXXX UTC -0010-09-15T04:44:23 = XXXXXX, 15 XXXXXXXXXX, -10 4:44:23 XXXXXXXXX UTC Long 2008-02-05T18:30:30 = 5 XXXXXXXXXXX, 2008 6:30:30 XXXXXXX UTC 1995-12-22T09:05:02 = 22 XXXXXXXX, 1995 9:05:02 XXXXXXXXX UTC -0010-09-15T04:44:23 = 15 XXXXXXXXXX, -10 4:44:23 XXXXXXXXX UTC Medium 2008-02-05T18:30:30 = 5 XXXXXXXXXXX, 2008 6:30:30 XXXXXXX 1995-12-22T09:05:02 = 22 XXXXXXXX, 1995 9:05:02 XXXXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXXXXX, -10 4:44:23 XXXXXXXXX Short 2008-02-05T18:30:30 = 5/2/08 6:30 XXXXXXX 1995-12-22T09:05:02 = 22/12/95 9:05 XXXXXXXXX -0010-09-15T04:44:23 = 15/9/-10 4:44 XXXXXXXXX Default 2008-02-05T18:30:30 = 5 XXXXXXXXXXX, 2008 6:30:30 XXXXXXX 1995-12-22T09:05:02 = 22 XXXXXXXX, 1995 9:05:02 XXXXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXXXXX, -10 4:44:23 XXXXXXXXX Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XXXXX 1995-12-22T09:05:02 = 22 XXXXX -0010-09-15T04:44:23 = 15 XXX Hm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 XXXXXXX 1995-12-22T09:05:02 = 9:05 XXXXXXXXX -0010-09-15T04:44:23 = 4:44 XXXXXXXXX Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 XXXXXXX 1995-12-22T09:05:02 = 9:05:02 XXXXXXXXX -0010-09-15T04:44:23 = 4:44:23 XXXXXXXXX M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/M) 2008-02-05T18:30:30 = 5/2 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/9 MEd (E, d-M) 2008-02-05T18:30:30 = XXXXX, 5-2 1995-12-22T09:05:02 = XXXXX, 22-12 -0010-09-15T04:44:23 = XXX, 15-9 MMdd (dd-MM) 2008-02-05T18:30:30 = 05-02 1995-12-22T09:05:02 = 22-12 -0010-09-15T04:44:23 = 15-09 MMM (LLL) 2008-02-05T18:30:30 = XXXXXXXXXXX 1995-12-22T09:05:02 = XXXXXXXX -0010-09-15T04:44:23 = XXXXXXXXXX MMMd (d MMM) 2008-02-05T18:30:30 = 5 XXXXXXXXXXX 1995-12-22T09:05:02 = 22 XXXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXXXXX MMMEd (E d MMM) 2008-02-05T18:30:30 = XXXXX 5 XXXXXXXXXXX 1995-12-22T09:05:02 = XXXXX 22 XXXXXXXX -0010-09-15T04:44:23 = XXX 15 XXXXXXXXXX MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXXXXXXXX 1995-12-22T09:05:02 = 22 XXXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXXXXX MMMMEd (E d MMMM) 2008-02-05T18:30:30 = XXXXX 5 XXXXXXXXXXX 1995-12-22T09:05:02 = XXXXX 22 XXXXXXXX -0010-09-15T04:44:23 = XXX 15 XXXXXXXXXX ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (M/yyyy) 2008-02-05T18:30:30 = 2/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 9/-010 yMEd (EEE, d/M/yyy) 2008-02-05T18:30:30 = XXXXX, 5/2/2008 1995-12-22T09:05:02 = XXXXX, 22/12/1995 -0010-09-15T04:44:23 = XXX, 15/9/-10 yMMM (MMM y) 2008-02-05T18:30:30 = XXXXXXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXXXX -10 yMMMEd (EEE, d MMM, y) 2008-02-05T18:30:30 = XXXXX, 5 XXXXXXXXXXX, 2008 1995-12-22T09:05:02 = XXXXX, 22 XXXXXXXX, 1995 -0010-09-15T04:44:23 = XXX, 15 XXXXXXXXXX, -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXXXX -10 yQ (Q y) 2008-02-05T18:30:30 = 1 2008 1995-12-22T09:05:02 = 4 1995 -0010-09-15T04:44:23 = 3 -10 yQQQ (QQQ y) 2008-02-05T18:30:30 = XXXXXXXXX X 2008 1995-12-22T09:05:02 = XXXXXXXXX X 1995 -0010-09-15T04:44:23 = XXXXXXXXX X -10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMM (MM-yyyy) 2008-02-05T18:30:30 = 02-2008 1995-12-22T09:05:02 = 12-1995 -0010-09-15T04:44:23 = 09--010 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXXXX -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::bn_BD(3)
All times are GMT -4. The time now is 10:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy