Search Results

Search: Posts Made By: Rajesh_us
1,465
Posted By Rajesh_us
i understand it .. thanks a lot
i understand it .. thanks a lot
1,465
Posted By Rajesh_us
thanks a lot. it works. awk '/000/'...
thanks a lot. it works.

awk '/000/' file1.txt

here im not using $0 but still it working

cant we pass 000 as variable in the above code ??
1,465
Posted By Rajesh_us
i just want search 000 ( It can be anywhere in...
i just want search 000 ( It can be anywhere in the line ..not exactly 3 rd field) and print the entire line.
1,465
Posted By Rajesh_us
i want to search 000 and print the entire line.....
i want to search 000 and print the entire line.. i dont wan to change anything
1,465
Posted By Rajesh_us
awk Variable
i have data like this. it is in file1.txt

1 james 888
2 test 999
3 test1 111
4 test2 000


if i run the code

awk -v "a=000" '/a/' file1.txt

1 james 888 ...
1,366
Posted By Rajesh_us
Problem with traverse through line
i have a file like below

New_file.txt
123|345|ab cd|ef gh
345|456|jk hu|uyh

My script is

#!/bin/ksh
set -x
for line in `cat New_file.txt`
do
a1=`echo $line|cut -d '|' -f1`
echo $a1...
1,992
Posted By Rajesh_us
thanks a lot
thanks a lot
1,992
Posted By Rajesh_us
Thanks, nawk is not working for me but awk...
Thanks,

nawk is not working for me but awk is working

echo "1,2,3,4"|awk -F "," 'NR==n{$3=a}1' n=1 a=45 OFS=","

few more questions

if i have a variable number1

i need to check...
1,992
Posted By Rajesh_us
[Solved] Why awk removes delimiters?
Code :

echo "1,2,3,4"|awk -F "," 'NR==n{$3=a}1' n=1 a=45

Output :

1 2 45 4

Expected :

1,2,45,4
7,225
Posted By Rajesh_us
thanks a lot don cragun.. hope u recovered from...
thanks a lot don cragun.. hope u recovered from flu
7,225
Posted By Rajesh_us
i changed it $5=rot($5,2,3) Input : ...
i changed it

$5=rot($5,2,3)

Input :

03079

output :

97960

what i'm expecting

06929
7,225
Posted By Rajesh_us
I tried it Example3: $5=rot($5,3) ...
I tried it

Example3:

$5=rot($5,3)

Input:
AILLIAM
Output:
OORZN

Starting from 3 , it converts everything but first two fields got removed


Example4:

$5=rot($5,2,3)

Input:...
7,225
Posted By Rajesh_us
it works.. just thanks is not enough for u...
it works.. just thanks is not enough for u guys... for now , thanks a lot

---------- Post updated at 11:59 PM ---------- Previous update was at 10:40 PM ----------





i'm afraid to ask a...
7,225
Posted By Rajesh_us
where should i include the line number ?? i need...
where should i include the line number ?? i need to

Something like this

NR == k3

or

k3='NM1\\*IL\\*1*'
awk -v k3="$k3" '


and i tried to running the above command with line...
7,225
Posted By Rajesh_us
Sorry for inconvenience ! I will identify...
Sorry for inconvenience !

I will identify few lines in the file based on some predefined strings. On each identified line , I need to do manipulation on only few fields. Again within the fields,...
7,225
Posted By Rajesh_us
sorry i gave wrong information.. here it is i...
sorry i gave wrong information.. here it is i wanted.. please refer the updated one

i don't have any issue with the above code. is it possible to make the above code work on single field .. say...
7,225
Posted By Rajesh_us
awk -v k3="$k3" ' BEGIN{ ...
awk -v k3="$k3" '
BEGIN{
F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
T="ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba9876543210"
...
7,225
Posted By Rajesh_us
Very Very thanks don cragun ! you guys rocks like...
Very Very thanks don cragun ! you guys rocks like anyhting.
7,225
Posted By Rajesh_us
i think i got what i need for but i noticed...
i think i got what i need for

but i noticed 9 remains same

Input ) NM1*IL*1*AYNCH*AILLIAM****AI*R02089540
outpu ) NM1*IL*1*ZBMXS*ZROORZN****ZR*I97919459
Please use CODE tags. Trying to...
7,225
Posted By Rajesh_us
it works. thanks a lot ! ---------- Post...
it works. thanks a lot !

---------- Post updated at 05:29 PM ---------- Previous update was at 04:29 PM ----------



sorry to bother you again. Do you have any restriction in your code on...
7,225
Posted By Rajesh_us
Based on ur code the output is ...
Based on ur code

the output is

NM1*IL*1*LBMXSDROORZNNRI97914


Where the * ( stars) ? it should be unchanged .. alpha should be alpha and numbers should be numbers.
7,225
Posted By Rajesh_us
without sequences , can we put everything...
without sequences , can we put everything together , so that i will achieve what i want or any other suggestion
7,225
Posted By Rajesh_us
it is working .. thanks a lot ----------...
it is working .. thanks a lot

---------- Post updated 01-16-14 at 03:11 PM ---------- Previous update was 01-15-14 at 06:24 PM ----------



Hello.

If my 18 th line is
...
1,471
Posted By Rajesh_us
eval can be dangerous - Can you explain on this
eval can be dangerous - Can you explain on this
1,471
Posted By Rajesh_us
Variables
when

N1=1
a1=18

Piece of code :

f1=$"a"$N1
echo $f1

Im expecting output as 18 .. but it is not working as expected
Showing results 1 to 25 of 34

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