Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Insert text into a file using shell script Post 302882628 by chacko193 on Wednesday 8th of January 2014 07:49:46 AM
Old 01-08-2014
You can redirect the output of echo to file.
Code:
echo "Hello world." > Hi.txt

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to run shell command and insert results to existing xml file

Hi. Thanks for any help with this. I'm not new to programming but I am new to shell programming. I need a script that will 1. execute 'df -k' and return the volume names with specific text 2. surround each line of the above results in opening and closing xml tags 3. insert the results of step... (5 Replies)
Discussion started by: littlejon
5 Replies

2. Shell Programming and Scripting

How to insert some constant text at beginig of each line within a text file.

Dear Folks :), I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp. I can do this in vi editor by using this command :g/^/s//BBB_ e,g I have a file named as Test.dat and it containins below text: michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies

3. Shell Programming and Scripting

Need to insert new text and change existing text in a file using SED

Hi all, I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output. sed '$a\ hi... ' shell > shell1 But I face problem when using the same in script. It is throwing the error as, sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies

4. Shell Programming and Scripting

awk script to insert text in file

I'm in a time crunch here and I don't know how to write scripts. I have a file of data that looks like the following: 1 7.652073E+00 0.000000E+00 7.146691E+02 1.704154E+01 2 7.652068E+00 6.031387E+00 7.146636E+02 2.499305E+01 3 7.645906E+00 1.509455E+01 7.144158E+02 1.822061E+02 4... (7 Replies)
Discussion started by: pk218703
7 Replies

5. Shell Programming and Scripting

Script to insert text from one file to other file

Hello Team, I need help in preparing script which will insert text from one file to other file. I have requirement to prepare script which will insert data from one file to another file. I have tried using sed and awk command but it is not useful to me as it does not append data in the... (12 Replies)
Discussion started by: coolguyamy
12 Replies

6. Shell Programming and Scripting

Korn shell program to parse CSV text file and insert values into Oracle database

Enclosed is comma separated text file. I need to write a korn shell program that will parse the text file and insert the values into Oracle database. I need to write the korn shell program on Red Hat Enterprise Linux server. Oracle database is 10g. (15 Replies)
Discussion started by: shellguy
15 Replies

7. UNIX for Dummies Questions & Answers

Shell script find word from one file and insert in another file

Hi, I am new to shell scripting. I need a bash shell scripts which search and grep a parameter value from input.txt file and insert it in between two semicolon of second line of output.txt file. For example The shell script search an IP address as parameter value from input.txt ... (2 Replies)
Discussion started by: sunilkumarsinha
2 Replies

8. Shell Programming and Scripting

Shell Script to insert text after Tag

Hello, I'm doing an Shell Script to insert a text on XML file, i tried sed, awk, perl... i'm doing something wrong, please help me :) well, the script is a bit large, i get some infos on script before 'run' this part to insert the text on XML... domobile() { let i++ echo ... (1 Reply)
Discussion started by: tassomanoel
1 Replies

9. UNIX for Beginners Questions & Answers

TCL script to insert some text on a file

Hi All , I am looking to create one TCL script to insert one text based on some regular expression match on one file as stated below Input File module (mem1 ,mem2 , bist1 , ten2 , sen1 , land2 , taane2 , ran1 , ran2 , tri2 , tri8 , fly1 , fly2 , san2 ); output ran1 , ran2 , tri2 ,... (1 Reply)
Discussion started by: kshitij
1 Replies
DateTime::Locale::vi(3) 				User Contributed Perl Documentation				   DateTime::Locale::vi(3)

NAME
DateTime::Locale::vi SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'vi' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Vietnamese. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) ThX hai ThX ba ThX tX ThX nXm ThX sau ThX bXy ChX nhXt Abbreviated (format) Th 2 Th 3 Th 4 Th 5 Th 6 Th 7 CN Narrow (format) Th 2 Th 3 Th 4 Th 5 Th 6 Th 7 CN Wide (stand-alone) ThX hai ThX ba ThX tX ThX nXm ThX sau ThX bXy ChX nhXt Abbreviated (stand-alone) Th 2 Th 3 Th 4 Th 5 Th 6 Th 7 CN Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) thang mXt thang hai thang ba thang tX thang nXm thang sau thang bXy thang tam thang chin thang mXXi thang mXXi mXt thang mXXi hai Abbreviated (format) thg 1 thg 2 thg 3 thg 4 thg 5 thg 6 thg 7 thg 8 thg 9 thg 10 thg 11 thg 12 Narrow (format) thg 1 thg 2 thg 3 thg 4 thg 5 thg 6 thg 7 thg 8 thg 9 thg 10 thg 11 thg 12 Wide (stand-alone) thang mXt thang hai thang ba thang tX thang nXm thang sau thang bXy thang tam thang chin thang mXXi thang mXXi mXt thang mXXi hai Abbreviated (stand-alone) thg 1 thg 2 thg 3 thg 4 thg 5 thg 6 thg 7 thg 8 thg 9 thg 10 thg 11 thg 12 Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated tr. CN sau CN Narrow tr. CN sau CN Date Formats Full 2008-02-05T18:30:30 = ThX ba, ngay 05 thang hai nXm 2008 1995-12-22T09:05:02 = ThX sau, ngay 22 thang mXXi hai nXm 1995 -0010-09-15T04:44:23 = ThX bXy, ngay 15 thang chin nXm -10 Long 2008-02-05T18:30:30 = Ngay 05 thang 2 nXm 2008 1995-12-22T09:05:02 = Ngay 22 thang 12 nXm 1995 -0010-09-15T04:44:23 = Ngay 15 thang 9 nXm -10 Medium 2008-02-05T18:30:30 = 05-02-2008 1995-12-22T09:05:02 = 22-12-1995 -0010-09-15T04:44:23 = 15-09--010 Short 2008-02-05T18:30:30 = 05/02/2008 1995-12-22T09:05:02 = 22/12/1995 -0010-09-15T04:44:23 = 15/09/-010 Default 2008-02-05T18:30:30 = 05-02-2008 1995-12-22T09:05:02 = 22-12-1995 -0010-09-15T04:44:23 = 15-09--010 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC ThX ba, ngay 05 thang hai nXm 2008 1995-12-22T09:05:02 = 09:05:02 UTC ThX sau, ngay 22 thang mXXi hai nXm 1995 -0010-09-15T04:44:23 = 04:44:23 UTC ThX bXy, ngay 15 thang chin nXm -10 Long 2008-02-05T18:30:30 = 18:30:30 UTC Ngay 05 thang 2 nXm 2008 1995-12-22T09:05:02 = 09:05:02 UTC Ngay 22 thang 12 nXm 1995 -0010-09-15T04:44:23 = 04:44:23 UTC Ngay 15 thang 9 nXm -10 Medium 2008-02-05T18:30:30 = 18:30:30 05-02-2008 1995-12-22T09:05:02 = 09:05:02 22-12-1995 -0010-09-15T04:44:23 = 04:44:23 15-09--010 Short 2008-02-05T18:30:30 = 18:30 05/02/2008 1995-12-22T09:05:02 = 09:05 22/12/1995 -0010-09-15T04:44:23 = 04:44 15/09/-010 Default 2008-02-05T18:30:30 = 18:30:30 05-02-2008 1995-12-22T09:05:02 = 09:05:02 22-12-1995 -0010-09-15T04:44:23 = 04:44:23 15-09--010 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 Th 3 1995-12-22T09:05:02 = 22 Th 6 -0010-09-15T04:44:23 = 15 Th 7 H (H) 2008-02-05T18:30:30 = 18 1995-12-22T09:05:02 = 9 -0010-09-15T04:44:23 = 4 HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 CH 1995-12-22T09:05:02 = 9:05 SA -0010-09-15T04:44:23 = 4:44 SA 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 CH 1995-12-22T09:05:02 = 9:05:02 SA -0010-09-15T04:44:23 = 4:44:23 SA 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 = Th 3, 5-2 1995-12-22T09:05:02 = Th 6, 22-12 -0010-09-15T04:44:23 = Th 7, 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 = thg 2 1995-12-22T09:05:02 = thg 12 -0010-09-15T04:44:23 = thg 9 MMMd (d MMM) 2008-02-05T18:30:30 = 5 thg 2 1995-12-22T09:05:02 = 22 thg 12 -0010-09-15T04:44:23 = 15 thg 9 MMMEd (E d MMM) 2008-02-05T18:30:30 = Th 3 5 thg 2 1995-12-22T09:05:02 = Th 6 22 thg 12 -0010-09-15T04:44:23 = Th 7 15 thg 9 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 thang hai 1995-12-22T09:05:02 = 22 thang mXXi hai -0010-09-15T04:44:23 = 15 thang chin MMMMEd (E d MMMM) 2008-02-05T18:30:30 = Th 3 5 thang hai 1995-12-22T09:05:02 = Th 6 22 thang mXXi hai -0010-09-15T04:44:23 = Th 7 15 thang chin mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 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 (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, d-M-yyyy) 2008-02-05T18:30:30 = Th 3, 5-2-2008 1995-12-22T09:05:02 = Th 6, 22-12-1995 -0010-09-15T04:44:23 = Th 7, 15-9--010 yMMM (MMM y) 2008-02-05T18:30:30 = thg 2 2008 1995-12-22T09:05:02 = thg 12 1995 -0010-09-15T04:44:23 = thg 9 -10 yMMMEd (EEE, d MMM y) 2008-02-05T18:30:30 = Th 3, 5 thg 2 2008 1995-12-22T09:05:02 = Th 6, 22 thg 12 1995 -0010-09-15T04:44:23 = Th 7, 15 thg 9 -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = thang hai 2008 1995-12-22T09:05:02 = thang mXXi hai 1995 -0010-09-15T04:44:23 = thang chin -10 yQ (Q yyyy) 2008-02-05T18:30:30 = 1 2008 1995-12-22T09:05:02 = 4 1995 -0010-09-15T04:44:23 = 3 -010 yQQQ (QQQ y) 2008-02-05T18:30:30 = Q1 2008 1995-12-22T09:05:02 = Q4 1995 -0010-09-15T04:44:23 = Q3 -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 yyyy (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -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 Miscellaneous Prefers 24 hour time? Yes Local first day of the week ThX hai 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.16.2 2013-08-25 DateTime::Locale::vi(3)
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy