Sponsored Content
Full Discussion: Script to insert a line
Top Forums UNIX for Dummies Questions & Answers Script to insert a line Post 302893505 by Indra2011 on Wednesday 19th of March 2014 02:26:11 PM
Old 03-19-2014
-------

Last edited by Indra2011; 03-19-2014 at 03:31 PM.. Reason: its wrong format ..no CODE option used...
 

10 More Discussions You Might Find Interesting

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

2. UNIX for Dummies Questions & Answers

Need Script to insert colons in each line of file

I have a file with over 500 MAC addresses. Each address is on a new line. However, the MACs do not have ":" I need a script that will read the file, line by line and insert colons in the addresses and then print the results to a new file. current.txt looks like this 111111111111 222222222222... (4 Replies)
Discussion started by: canopus15
4 Replies

3. Shell Programming and Scripting

awk script to compare and insert a line

Hi I want to compare a string at fixed position 10-20 for all the lines starting with 6. if they dont match it should take a copy of a line starting with 1 and insert it before the line starting with 6. How do i this? Please help Eg 1 test 1 765533 7643743 6 yes 3 5363653 373833 7... (9 Replies)
Discussion started by: appsguy616
9 Replies

4. Shell Programming and Scripting

Shell script to parse a line and insert a word

Hi All, I have a file like this, data1,data2,,,data5,data6. i want to write a shell script to replace data3 with "/example/string". which means my data file should look like this . data1,data2,example/string],,data5,data6. Could you guys help me to get a sed command or any other command... (8 Replies)
Discussion started by: girish.raos
8 Replies

5. UNIX for Dummies Questions & Answers

shell script : log to txt and insert new line everytime

Hi, I have this script, while do ps ax|grep 5060 > log.txt echo " " sleep 1 done } I want to actually put a new line everytime the loop is executed in log.txt , but I do not know how to "embed" the echo " " inside the log.txt. (so to say... (1 Reply)
Discussion started by: peuceul
1 Replies

6. Shell Programming and Scripting

Korn Shell script to insert at specific line

Hi, I am trying to put together a Korn Shell script to insert at a specific line. The system we use is SunOS 5.10 I can get the line number by using:- num=`sed -n '/export ENV/=' ./tmp.file` Not getting much headway using the above variable's value to insert - export SYBASE=/opt/sybase15... (5 Replies)
Discussion started by: aj8200
5 Replies

7. Shell Programming and Scripting

sed - How to insert line before the first blank line following a token

Hello. I have a config file (/etc/my_config_file) which may content : # # port for HTTP (descriptions, SOAP, media transfer) traffic port=8200 # network interfaces to serve, comma delimited network_interface=eth0 # set this to the directory you want scanned. # * if have multiple... (6 Replies)
Discussion started by: jcdole
6 Replies

8. Shell Programming and Scripting

How to read a text file line by line and insert into a database table?

I have a test file that I want to read and insert only certain lines into the the table based on a filter. 1. Rread the log file 12 Hours back Getdate() -12 Hours 2. Extract the following information on for lines that say "DUMP is complete" A. Date B. Database Name C.... (2 Replies)
Discussion started by: JolietJake
2 Replies

9. Solaris

sed insert into line 1 via script

Hi I am trying to run a sed command within a script..unfortunately it wasn't written on Solaris so doesn't work. Can anyone help with the correct coding please? It is: sed -i '1i ROWID;ORDER_ID;JOB_NAME;ORDER_TABLE' ${OUTFILE} (4 Replies)
Discussion started by: Grueben
4 Replies

10. UNIX for Beginners Questions & Answers

Insert a line of text on nth line of a file

Hi All, I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise My intention is to insert a line of text after 13th line of every file inside a particular directory. While trying to do it for a single file , i am using sed sed '3 i this is the 4th line' filename sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
Jifty::Script::Model(3pm)				User Contributed Perl Documentation				 Jifty::Script::Model(3pm)

NAME
Jifty::Script::Model - Add a model class to your Jifty application SYNOPSIS
jifty model --name MyFirstModel jifty model --name MyFirstModel --force Options: --name <name> name of the model --force overwrite files --help brief help message --man full documentation DESCRIPTION
Creates a skeleton model file. options --name NAME (required) Name of the model class. --force By default, this will stop and warn you if any of the files it is going to write already exist. Passing the --force flag will make it overwrite the files. --help Print a brief help message and exits. --man Prints the manual page and exits. DESCRIPTION
This creates a skeleton of a new model class for your jifty application, complete with a skeleton of a test suite for it, as well. METHODS
run Creates a skeleton file under "lib/ApplicationClass/Model/Model", as well as a skeleton tests file. DESCRIPTION
A basic test harness for the $model model. perl v5.14.2 2010-09-25 Jifty::Script::Model(3pm)
All times are GMT -4. The time now is 07:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy