But the command given by you will append the line in a operational status file.
I would like to append that line after following line in a status file.
The new text should always get appended after the following line in a operational file.
Last edited by Scott; 11-26-2010 at 06:56 AM..
Reason: Code tags
Script 1
Pre-requisites
Create a file with x amount of lines in it, the content of your choice.
Write a script that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the... (3 Replies)
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)
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)
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)
Hi All,
Can someone pls help me to insert some text on a file.
my file contains something like below..
AKBULBU,
BALUMIL,
BATCH,BATCH
BOARROB,
BOTAKAT,
C57896,
CAKIOZE,
CHECMER,
CICOFRA,
CISZPAW,2194485
I want output as
USER_ID, LOGIN_ID (6 Replies)
Hi,
I have a single value in insertval file. I want to load that value to database with the current date. I tried the below code but it is inserting <NULL> to database and echo $c is also null.
cat insertval | awk -F ' ' '{print $1}' > c
echo c=$c
data=`sqlplus -s user/pwd@hostname <<EOF ... (5 Replies)
Hi,
I need to insert "Hello World" text into a file called hai.txt using shell scripting. Kindly help me.
For eg: If I open the file hai.txt by giving linux command cat hai.txt, the content of the file should have the text Hello World in it.
Thanks (5 Replies)
Hi,
I am trying to check for missing dates in a file and would want to insert the missing date into the file.
Currently the script is as below
#!/bin/ksh
dates="dates"
cat ${dates} | grep -v "^#"
curr_month=`date '+%m`
curr_day=`date '+%d`
curr_year=`date '+%Y`
#curr_month=02... (7 Replies)
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)