Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to insert data in a file at last? Post 302736963 by pamu on Wednesday 28th of November 2012 08:19:31 AM
Old 11-28-2012
See this..

Code:
$ DATE=12/11/2012

$ cat file
11/01/2012
12/07/2012
--
--

Code:
$ echo "$DATE" >> file

Code:
$ cat file
11/01/2012
12/07/2012
--
--
12/11/2012

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed, insert data from a file to another?

Hello, I have 2 files. File1 has data I wrote, and File2 is a file created by an application. I would like to insert the data from File1 into File2, but it has to be inserted at a certain location on File2. I know I need to search for "</jsp-param> </jsp-descriptor>" But I don't know... (4 Replies)
Discussion started by: ctcuser
4 Replies

2. Shell Programming and Scripting

how to insert data in database based on text file?

Hi....can you guys help me out in this script?? Below is a text file script....called Bukom.txt and it contains these: BUKOM 20060101 2.5 2.6 2.7 2.8 2.9 2.3 2.1 BUKOM 20060102 2.4 2.5 2.6 2.7 2.7 2.6 2.4 BUKOM 20060103 2.1 ... (9 Replies)
Discussion started by: forevercalz
9 Replies

3. HP-UX

find the position in a file and insert the data there

Hi, I have a EDI data file ARROWTEST of size 18246 characters. And I want to insert some data after 4200 position in the file. How I can find the position 4200 in that file....Please advise. Regards, (5 Replies)
Discussion started by: isingh786
5 Replies

4. UNIX for Dummies Questions & Answers

How to insert new line in the data file using the script

Hi all, I have a test.dat file.In that file i have many lines of data. IN between some lines i want to insert a new line while running the test.ksh. Say for ex: In the dat file i have data like N001 100.00 N001 200.00 N001 300.00 N001 400.00 <== After this line i want to... (2 Replies)
Discussion started by: Sona
2 Replies

5. Shell Programming and Scripting

How to insert data into MYSql database from a text file

Hi, Need to get help from you guys about this issue. I need to insert data into MySql database from a text file which is located in other server. The text file is something look like below: Date | SubscriberNo | Call Duration 20/7/07 | 123456788 | 20 20/7/07 | 123412344 | 30 The... (4 Replies)
Discussion started by: shirleyeow
4 Replies

6. Shell Programming and Scripting

insert a header in a huge data file without using an intermediate file

I have a file with data extracted, and need to insert a header with a constant string, say: H|PayerDataExtract if i use sed, i have to redirect the output to a seperate file like sed ' sed commands' ExtractDataFile.dat > ExtractDataFileWithHeader.dat the same is true for awk and... (10 Replies)
Discussion started by: deepaktanna
10 Replies

7. Emergency UNIX and Linux Support

Insert data into sql queries from a file

Hello friends, I need to insert data from a file to another. I need this to form an sql query file which will consist of 50.000 INSERT INTO sentences. my sql query file will consist of 50.000 times the below line consecutively: insert into subscriber... (6 Replies)
Discussion started by: EAGL€
6 Replies

8. Shell Programming and Scripting

How to insert/expand data/rows in a file, with rules??

Hi, I am rather new to Unix/Linus. I have this problem that I would like to solve using unix. Here is what I have start stop expression 1 5 15 2 6 10 I want a output like this position expression 1 15 2 25 3 ... (3 Replies)
Discussion started by: wanghlv
3 Replies

9. Shell Programming and Scripting

Insert data between comma delimiters-large file

Having a huge file in the following format. 2,3,1,,,4 1,2,3,,,,,5, 8,7,3,4,,,, Output needed is: 2,3,1,0.0,0.0,4 1,2,3,0.0,0.0,0.0,0.0,5, 8,7,3,4,0.0,0.0,0.0, I have tried reading the file each line, using AWK to parse to find out ",," and then insert 0.0 . It works but very slow. Need... (8 Replies)
Discussion started by: wincrazy
8 Replies

10. Shell Programming and Scripting

Insert space or pattern between columns in a data file

I have a data file where three data sets are written in three columns. Can I increase the space between the columns without reading them? Also can I insert particular patterns, say comma between 1st and 2nd column and colon between 2nd and 3rd column? (13 Replies)
Discussion started by: hbar
13 Replies
IO::Async::Signal(3pm)					User Contributed Perl Documentation				    IO::Async::Signal(3pm)

NAME
"IO::Async::Signal" - event callback on receipt of a POSIX signal SYNOPSIS
use IO::Async::Signal; use IO::Async::Loop; my $loop = IO::Async::Loop->new; my $signal = IO::Async::Signal->new( name => "HUP", on_receipt => sub { print "I caught SIGHUP "; }, ); $loop->add( $signal ); $loop->run; DESCRIPTION
This subclass of IO::Async::Notifier invokes its callback when a particular POSIX signal is received. Multiple objects can be added to a "Loop" that all watch for the same signal. The callback functions will all be invoked, in no particular order. EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters: on_receipt Invoked when the signal is received. PARAMETERS
The following named parameters may be passed to "new" or "configure": name => STRING The name of the signal to watch. This should be a bare name like "TERM". Can only be given at construction time. on_receipt => CODE CODE reference for the "on_receipt" event. Once constructed, the "Signal" will need to be added to the "Loop" before it will work. AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::Signal(3pm)
All times are GMT -4. The time now is 06:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy