Search Results

Search: Posts Made By: prsam
8,055
Posted By prsam
is anything wrong in this?
#!/usr/bin/perl
use strict;
my $abs;
open(FILE ,"tt.txt");
seek(FILE,-2,2);
read(FILE,$abs,1);
print $abs;
$abs=~s/^Z//g;
print FILE "$abs";
print $abs;
close(FILE);


I want to directly...
8,055
Posted By prsam
can anyone help
Can anyone give the entire code(using truncate) to achieve this please.
If any other solution also please let me know thanks.
8,055
Posted By prsam
perl cmd to remove the control-Z character at end of 10GB file
In a 10-50GB file , at end of file there is Control-z character
tried the below options,
1. perl -p -i -e 's/^Z//g' new.txt
2. perl -0777lwi -032e0 new.txt
and Sed command, dos2unix etc

it...
1,352
Posted By prsam
Please help me out reg syb15 query
When i run the below query in syb15 (with syb 12.5.X backward compatibilty) environment it runs 45min where as the same in syb12.5.1 it takes only 7-10min.

But the main thing is stld_date(in the...
Forum: UNIX and Linux Applications 01-19-2010
1,776
Posted By prsam
Syb15 Query takes longer, help me out
When i run the below query in syb15 (with syb 12.5.X backward compatibilty) environment it runs 45min where as the same in syb12.5.1 it takes only 7-10min.
But the main thing is stld_date(in the...
6,524
Posted By prsam
Can any one please reply??????
Thnx tutor for answers...
i forgot to mention about onething of the 1st que...
1..
file.<day value> ------ i.e file.08(as per yesterday)
grep "name" file.(day value) > file1.(day value)
rm -f...
6,524
Posted By prsam
how to get the timestamp using touch command
Can any one provide answer for the below 3 requirements,

1.
file.txt
grep "name" file.txt > file1.txt
rm -f file.txt
mv file1.txt file.txt

as per abov,
a pattern grepped in file.txt and...
2,179
Posted By prsam
How could i get this by sed or grep or awk ????
------------------------------------------------------------------
Ex of Warning messgae,(Many similar lines occure for Both Test and Test1)

-WARNING:Below Field not implemented in file File...
5,280
Posted By prsam
--------------------------------------------------...
------------------------------------------------------------------
Ex of Warning messgae,(Many similar lines occure for Both Test and Test1)

-WARNING:Below Field not implemented in file File...
5,280
Posted By prsam
Thanks Tutor. It worked fine.
Thanks Tutor. It worked fine.
5,280
Posted By prsam
#!/bin/ksh i=`date +%d` sed `/WARNING:Below...
#!/bin/ksh
i=`date +%d`
sed `/WARNING:Below field is not in File name/{N/\n/d}' load.$i >> load_new.txt


Using ur script i gave lik above but i am getting the following error,
-----------...
5,280
Posted By prsam
Thanks vidyadhar85 for ur reply but i need to...
Thanks vidyadhar85 for ur reply but i need to print all the lines except the line havin word and its next line..

u gave seprate commands but i need a single command which does both the thing.
5,280
Posted By prsam
what is the similar command for "grep -v" in nawk?
Can any one please say about the below,

using,
grep -v "name" file.txt
the result of above command will be it will print all the lines except the line which having the word "name"
...
1,861
Posted By prsam
how to parse the content
How the below ex.txt file can be parsed using starting bracket'(' and ending bracket')' and hav to store the values without quotes in a text file.

There will be some 10 or 20 lines inbetween...
201,154
Posted By prsam
Thnx Frankln and stanley for ur reply...
Thnx Frankln and stanley for ur reply...
201,154
Posted By prsam
i should not remove the ^M characters by putting...
i should not remove the ^M characters by putting dos2unix command.
Actaully i want to find whether ^M character is present in the file or not by NOT opening the file.
i want some command like grep,...
201,154
Posted By prsam
How to find the ^M(control M) character in unix file?
can any one say about command to find "^M" (Control M)characters in a unix text file.

^M comes when a file ftped from windows to unix without using bin mode.

I need the command to find lik...
2,019
Posted By prsam
How to get the script corrected to get the solution
Can anyone help it out,

My Requirement:

Actually i grep for the items in the atrblist (Result of it will provide the line where the item present and also the next line of where it...
24,824
Posted By prsam
Any one please help
My Requirement:

Actually i grep for the items in atrblist (i wil get the line where the that item present and also the next line)then it will be stored in $i.txt
From tat result i wil grep...
24,824
Posted By prsam
Not working - any one help please
Can any one please provide the command,

the below command works wrong,
sed 's/.*getdate(),\(.*\),\(.*\),.*/\2/' < file

my txt file:
------------------------------------------...
24,824
Posted By prsam
Thanks Sameermohite
Thanks Sameermohite
24,824
Posted By prsam
can anyone please explain the above command????
can anyone please explain the above command????
24,824
Posted By prsam
Thnx dennis it will be helpful if u explain...
Thnx dennis
it will be helpful if u explain me the command u gave...
since i cant able to test that now(today) so could u explain each thing in it...
ex: what tat \2 means?
24,824
Posted By prsam
how to grep the word and display only the second word from it
hi, consider the below line in a text file,

'Y',getdate(),'N','V',NULL .....
'N',getdate(),'Y','D',NULL .....
'Y','N','Y',getdate(),'Y','D',NULL ....

as u see above, i want only the second...
Showing results 1 to 24 of 24

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