Search Results

Search: Posts Made By: ysvsr1
1,823
Posted By ysvsr1
Old Job : uname -a Linux...
Old Job :


uname -a

Linux pito.intra.doomsday.com 2.6.32-573.3.1.el6.x86_64 #1 SMP Thu Aug 13 22:55:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux




env

LESSKEY=/etc/lesskey.bin...
1,823
Posted By ysvsr1
UNIX Basics about shell and editors and default settings
Hi all,
I have 3-4 years of experience working on unix environment. I am not a beginner, but unix is not my primary skill set. I am very good at awk programming and doing many of my tasks very well,...
1,946
Posted By ysvsr1
awk weird error
Here is the awk code i wrote :


if [ -z "${delimiter}" ]; then
gawk -v field_position="$field_position" -v field_length="$field_length" -v header="$header" -v trailer="$trailer" -v lr="$lr" '{...
3,198
Posted By ysvsr1
OS: Linux x86_64 x86_64 x86_64 GNU/Linux ...
OS:
Linux x86_64 x86_64 x86_64 GNU/Linux

Sample Data :

YSVSR1 Kiladi 12198ASDA 21329180928AFJASDKDKDK ED AEFKF;p FK ADS 2132309183298209381 akfjalksdfjkdajfk j231 1239128390218309

...
3,198
Posted By ysvsr1
Sort and Remove duplicates
Here is my task :

I need to sort two input files and remove duplicates in the output files :


Sort by 13 characters from 97 Ascending
Sort by 1 characters from 96 Ascending


If...
1,456
Posted By ysvsr1
Optimized code awk ' BEGIN { z=1} { ...
Optimized code


awk '
BEGIN { z=1}
{
ink[$4]++;
inz[z]=$0;
in4[z]=$4;
inlast[z]=$5;
z++;
}
END {

cur="";prev=""
for(l=1;l<=z;l++)
{
cur=in4[l]
if(cur!=prev)
{
1,456
Posted By ysvsr1
It has to do with the way you are executing the...
It has to do with the way you are executing the awk. if you run the awk on command line it is working fine. I am not expert either on how to run it by placing the code in a file. May be some experts...
1,456
Posted By ysvsr1
awk 'BEGIN {...
awk 'BEGIN { prev="";cur="";cursign="";prevsign="";}
{
if($5!="")
cursign=$5;
cur=$4;
#print "prev =" prev " cur= " cur " cursign= " cursign " prevsign=" prevsign

if($5=="-")
{
...
12,167
Posted By ysvsr1
RudiC, Sample output 0000000 41 36 31 ...
RudiC, Sample output


0000000 41 36 31 31 34 30 39 32 39 30 30 30 30 30 30 30
A 6 1 1 4 0 9 2 9 0 0 0 0 0 0 0
0000020 30 30 34 33 30...
12,167
Posted By ysvsr1
We are getting binary data from the external...
We are getting binary data from the external vendor. It is then processed using a C Program and the output is good, but occasionally we get these extended characters that too, in 1 record out of...
12,167
Posted By ysvsr1
uname -a Linux xxx.com...
uname -a


Linux xxx.com 2.6.32-279.22.1.el6.x86_64 #1 SMP Wed Feb 6 03:10:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


Locale


LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"...
12,167
Posted By ysvsr1
Search and Replace Extended Ascii Characters
We are getting extended Ascii characters in the input file and my requirement is to search and replace them with a space. I am using the following command


LANG=C sed -e 's/[\x80-\xFF]/ /g'

...
1,391
Posted By ysvsr1
I dont need to retain the last white space. ...
I dont need to retain the last white space.

The challenge is that the number of columns/words is variable. In the example i stated there are four, but it can vary typically from 1 - 10 or even...
1,391
Posted By ysvsr1
Regex - search and replace
I have file which contains data in the following format all in a single line:

BDW_PUBLN_ID DECIMAL(18:0) NOT NULL PRIMARY INDEX ARGO_ACCT_DEP_PI ( OFC_ID ,CSHBX_ID ,TRXN_SEQ_NUM ,PROCG_DT )...
5,322
Posted By ysvsr1
Another Barbarian Method : gawk -v RS=";"...
Another Barbarian Method :


gawk -v RS=";" '{
if($0~/PRIMARY[ ]+INDEX/)
{
match($0,"PRIMARY[ ]+INDEX[ ]*[A-Za-z_ ]*[(]+[ A-Za-z_,]+",arr)
a=RSTART
b=RLENGTH
match($0,"PRIMARY[ ]+INDEX[...
5,322
Posted By ysvsr1
Regex - Capturing groups
I am having trouble with regex capturing groups, For Ex :

I am having a file with


ABC CDLF SFSDFK PRIMARY INDEX(XYZ,DEF,GHI);
XYZ FLJ SDFKLD; PRIMARY INDEX(ABC);
BHI SDKFLFLSFD ...
1,415
Posted By ysvsr1
MultiLine Patterns
Experts,
I am novice unix user. At my work, most of our DBA's work on creating DDL's to create new tables in production. At every week we need to validate the scripts (do peer review) and it takes a...
1,034
Posted By ysvsr1
awk - extracting a field
Hi all,
I have automated a process of doing a sanity check for the DDL created by other DBA's. But i am stuck at a point.

while reading a file in the awk, PI of the table is defined as

...
1,828
Posted By ysvsr1
awk: string followed by tab comparision
Hi all,
Currently i am using



if( $0~/ NOT / && $0~/ NULL /)
{
.................
}


to check if the input record contains "NOT" and "NULL". But in some cases "NOT" and...
3,670
Posted By ysvsr1
thx guys! It is working now ! ----------...
thx guys! It is working now !

---------- Post updated at 06:10 PM ---------- Previous update was at 04:37 PM ----------

Having problem with script expiration option :

shc -v -r -T -e...
3,670
Posted By ysvsr1
I am using : shc -v -r -T -f scriptname
I am using :

shc -v -r -T -f scriptname
3,670
Posted By ysvsr1
This is how it is showing up the entire code :( ...
This is how it is showing up the entire code :(

executing it using:

./run.x


+ grep -v -f cmp_data.txt cmp1_data.txt
+ 1>> tmp3.txt
+ cat temp3.txt temp6.txt
+ 1> temp_order.txt
+ awk...
3,670
Posted By ysvsr1
shc compiler issue
I am using the shc shell compiler, it works fine, just that when i execute it, it displays the code at the terminal. Is there any way to hide this as well? otherwise it beats the purpose of hiding...
2
awk
930
Posted By ysvsr1
awk
My input file has the data:



a b c U DDL
a b c N ERWIN
x y z U DDL
t h j N ERWIN
q w ...
3,075
Posted By ysvsr1
Comparing the DDL
I often times need to compare the DDL's:

Ex : File1 can contain the DDL of two tables (often more than 30 - 40)


CREATE MULTISET TABLE TEST
(
COLUMN1 CHAR(30) NULL,
COLUMN2 DECIMAL(8,2) NOT...
Showing results 1 to 25 of 36

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