Search Results

Search: Posts Made By: depakjan
1,759
Posted By depakjan
i have tried to do this, remove header and footer...
i have tried to do this, remove header and footer , merge both files and then add header footer back

sed '1d;$d' file1.txt > outfile1.txt
sed '1d;$d' file2.txt > outfile2.txt

cat...
1,759
Posted By depakjan
Merge two files and add the count
I have two files with same layout which i want to merge, removing the duplicate header and adding the count in footer


HD|09052014|09052014
data1|data2|data3
data1|data2|data3...
27,960
Posted By depakjan
This is working but it has 2 limitations. ...
This is working but it has 2 limitations.

1. it displays the output and it doesn't replace the contents of the file.

2.it replaces all the \ and not the first occurance alone in a line.
27,960
Posted By depakjan
It is a product called Actimize, we really cant...
It is a product called Actimize, we really cant change those processes to remove the blank lines :(
27,960
Posted By depakjan
That was just a sample.. there could be multiple...
That was just a sample.. there could be multiple occurances of '\' coming as first character in that file.

Also because of the last two blank lines
We can no longer use
$!s|^/|\\/|

since...
27,960
Posted By depakjan
This is the sample declare act_errors...
This is the sample


declare
act_errors number(10, 0);
at_least_one_exception EXCEPTION;
err_num NUMBER;
err_msg VARCHAR2(1000);
begin
act_errors := 0;
dbms_output.put_line('Starting to...
27,960
Posted By depakjan
i tried with some test file for which it worked...
i tried with some test file for which it worked correctly but for my actual file it still replaces the last line.. so on analysis i found there are two blank lines as shown below ><


end;
/...
27,960
Posted By depakjan
Hi Scottn, Thanks for the code, but it...
Hi Scottn,

Thanks for the code, but it still replaces the last line, any idea on how to skip the last line alone?
27,960
Posted By depakjan
It replaces last line also line is like...
It replaces last line also

line is like this


end;
/


I dont want the last forward slash to be replaced
27,960
Posted By depakjan
Thanks for that.. can someone tell if i could...
Thanks for that.. can someone tell if i could change the script to exclude the last line alone from this replace.
27,960
Posted By depakjan
Replace Forward Slash with sed
i need to replace '/' forward slash with \/(backward slash follwed by a forward slash) using sed command when the forward slash occurs as a first character in a file..

Tried something like this...
22,125
Posted By depakjan
Argument list too long for Sed command
Hi guys

Following command results in


sed -i 's/#/\\#/g' /home/test/sqlstents*



-bash: /bin/sed: Argument list too long


Please help me solve it.. is there any other way i...
1,508
Posted By depakjan
Can some1 give me a eloborate answer, i am very...
Can some1 give me a eloborate answer, i am very new at this
how do i store the result set to a variable in unix?

sed 's/:[^.]*/ /g' $summf


then how do i use this variable to insert into a...
1,508
Posted By depakjan
Unix shell command output to a sql statement
Can i do this

Say one command
sed 's/:[^.]*/ /g' $summf

is returning
C1234
C2345
C3434

some no of rows, now this ouput i have to insert it into a DB table

how do i do this??
5,762
Posted By depakjan
Zip all the files resulting from a sed command
hi guys i have a file in this location

/home/test/Summary.txt - this file contants is a below

./log_SI-100.lst:Error detected, rollbacking ./log_SI-101.lst:Error detected, rollbacking...
2,111
Posted By depakjan
Same one.. but have to send those log files as an...
Same one.. but have to send those log files as an attachment and i have write something in the body of the mail.. how do i do that.. thanks
2,111
Posted By depakjan
It works :) ... only thing is i have to be in the...
It works :) ... only thing is i have to be in the directory where these log_SI-100.lst
files are.. can i specify the path for these files in the code itself.. so that it wil work anywhere??
2,111
Posted By depakjan
Parse text file values and send those files as an attachment
We have these files in say \home\abcd\dm
Summary.txt
log_SI-100.lst
log_SI-101.lst
log_SI-106.lst

The contents of Summary.txt is as below

./log_SI-100.lst:Error detected, rollbacking...
5,380
Posted By depakjan
Grep a string in a range and delete the line
Hi,

i need to delete a lines after searching a particular string but this searching should only happen after the 4th line..

basically imagine a file like this

From: abcd.yahoo.com
To:...
2,117
Posted By depakjan
append a text to a file every month
i have something like below in my SAS code and every month i need to append a text say 'ext.hlc_sum0906' near ext.hlc_sum0905 and next month after ext.hlc_sum0906 i need to append this...
7,764
Posted By depakjan
Fast export in unix
/opt/teradata/client/bin/fexp <<EOP

.LOGTABLE load_work.datastore_log1 ;
.LOGON BOX/userid,password;
.BEGIN EXPORT
SESSIONS 20;
.EXPORT OUTFILE $path MODE RECORD FORMAT TEXT;

select ...
5,642
Posted By depakjan
guys can some1 please help on this.. i have'nt...
guys can some1 please help on this.. i have'nt got a solution yet....
5,073
Posted By depakjan
wow.. that was very quick.. thank you guys.. it...
wow.. that was very quick.. thank you guys.. it was very helpfull.. i din think this would be this simple.. you guys made my life easy :)
5,073
Posted By depakjan
Read a file and assign the values to a variable
i have a file in this format

curyymm PRVYYMM CDDMmmYY bddMmmyy eddMmmyy
--------- ------- ------------ ---------- -----------
0906 0905 09Jun09 01Jun09 ...
5,642
Posted By depakjan
i tried like this , but i get syntax error.. ...
i tried like this , but i get syntax error..
0403-057 Syntax error at line 3 : ``' is not matched.

#/bin/ksh
VAR1=`bteq<< EOD
.RUN FILE /home/nbk6cst/dbpass;
select * from...
Showing results 1 to 25 of 29

 
All times are GMT -4. The time now is 06:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy