Search Results

Search: Posts Made By: onesuri
2,234
Posted By onesuri
Date conversion DD-MMM-YY to YYYYMMDD for many columns in a file
Hi,

Input

Col1|col2|col3|col4|col5|col6-------col26
1|2|3|10-Nov-67|10-Nov-97|4|5-------100
1|2|3|11-Feb-01|01-Dec-15|4|5-------2000



Output
Col1|col2|col3|col4|col5|col6-------col26...
989
Posted By onesuri
awk command 2nd col remove the '-' value
Hi,

i was tried using the awk command for replacing '-' in the second column. but the below command replacing the entire file.

cat 1.txt |awk '{gsub(/-/,"")}1'

Input file
1,2,3,-4,5,6...
3,632
Posted By onesuri
Its resolved. I found another link the...
Its resolved.

I found another link the solution.
I am unable to find the resolved button.
3,632
Posted By onesuri
Multiple columns replace with null values.
I am trying to replace the partcular columns(Col3,col5,col20,col44,col55,co56,col59,col60,col61,col62,col74,col75,col88,col90,col91,col93,col94,col95) with empty

Input file
...
14,033
Posted By onesuri
awk search and replace nth column by using a variable.
I am passing a variable and replace nth value with the variable.
I tried using many options in awk command but unable to ignore the special characters in the output and also unable to pass the...
1,742
Posted By onesuri
After few modifications i am getting the proper...
After few modifications i am getting the proper output. thanks

awk '/^9999|~/{p=0} /dbc10/{p=1}p' file

but it is not returning any thing when i try to use as a parameter


input.txt
abc10...
1,742
Posted By onesuri
AIX OPERATING SYSTEM
AIX OPERATING SYSTEM
1,742
Posted By onesuri

1,742
Posted By onesuri
awk command for complex search and print
Input:


9999~cbc~100~209~ozzxczcz~10001001001~100~abc10
123~a~sdklfjl~sldoi~~~ksjdfnkjsdf~123456
125~g~sdklfjl~slsdfsdfsdfsdfdoi~~~~~~~~ksjdfnkjsdf~345
127~wera~sdklfjl~sldoi~~~ksjdfnkjsdf~123...
1,431
Posted By onesuri
While Loop issue
Hi,

i=0
t5=6000001
while [ $i -lt 100 ]
do

i=`expr $i + 1`
t5=`expr $t5 + 1`
echo $t5
done

I am able to increment "col3" value but unable to get col1,col2 value.


Input:
...
3,837
Posted By onesuri
String increment in UNIX
Hi,

I am able to increment numbers but unable to increment the charters in unix -AIX.

Source : AAA BB CCC
Increment Number : 5

OUTPUT:
AAA BB CCC
AAA BB CCD
AAA BB CCE
AAA BB CCF
AAA...
2,815
Posted By onesuri
/usr/bin/ksh
/usr/bin/ksh
2,815
Posted By onesuri
ksh ..
ksh ..
2,815
Posted By onesuri
tried same for((i=${a:0:1};i<5;i++)) getting...
tried same
for((i=${a:0:1};i<5;i++))
getting error
`(' unexpected.
2,815
Posted By onesuri
GNU bash, version 4.1.9(1)
GNU bash, version 4.1.9(1)
2,815
Posted By onesuri
now that statement not giving an error but giving...
now that statement not giving an error but giving different error.
"${a:0:2}-1": bad substitution
2,815
Posted By onesuri
Thanks for the quick response but it is giving as...
Thanks for the quick response but it is giving as an error
a=${a//\//-}: bad substitution
2,815
Posted By onesuri
Date Incremental in AIX
Hi,
I am trying to find an option in unix to increment for date filed.
I tried in the unix forums. unable to find the direct command to increment the value.

code
a= 01/Apr/13

while [ $a -lt...
1,734
Posted By onesuri
Tried the below command but it is not giving...
Tried the below command but it is not giving output.
If no value then it should not print the value.

Source File:

Input file contains:
...
1,333
Posted By onesuri
Extract data based on 2nd colume having double quotes
i want extract where the 2nd column having "3" or "7".
Based on the forums tried like this but it is not working

awk -F"," '$2=3;$2=7 {print}' filename

Source
"1","2","3","4"...
642
Posted By onesuri
Othen then if/sed - search and replace
i am able to achieve using if and elif. but we have 2000 hard code values then the code is big
based on the forums, tried sed [sed -e 's/10/6000/' -e 's/20/2000/' and so on] but that is also code is...
2,235
Posted By onesuri
Print output as columns
Normal grep is not working to get the output.


Sample Input:

newjob: abc
command name: a=b+c
newjob: bbc
command name: c=r+v
newjob:ddc
newjob:kkc
command name: c=l+g
newjob:mdc...
1,683
Posted By onesuri
Sorry for that. Here detailed information. I...
Sorry for that. Here detailed information.

I will get every day the below files but some of them did not arrive on the same day. I have to get the count only with the todays date.

Finally, two...
1,683
Posted By onesuri
Count for only todays files.
Hi,

I unable to find the direct command get the total count for the below files with today date.

ls -lrt c90.txt n5.txt t1.txt k3.txt h9.txt s1.txt n2.txt a123.txt

-rw-rw-r-- kkk klkl 980...
1,463
Posted By onesuri
Comparing two files on row by row and send the report
Comparing two files on row by row

File1

ecount~100
dcount~200
ccount~300
zxcscount~5000
and so on.

File2

ecount~100
dcount~203
ccount~300
zxcscount~5000
and so on.


If i use...
Showing results 1 to 25 of 82

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