Search Results

Search: Posts Made By: anshaa
2,507
Posted By anshaa
i couldnt find any relevant answers, hence...
i couldnt find any relevant answers, hence posted. some body please help.
i used
#! /bin/sh
olddate=`21/07/2013`
newdate=`22/07/2013`
if [ $olddate -gt $newdate ];then
echo "olddate"
else...
2,507
Posted By anshaa
Date Comparison
Hi
Need some function or step to compare the date as given below.

Example:
Date_1: 25/04/2013
Date_2: 20/07/2012

if Date_1 is greater than Date_2 then
do...
else
do..
fi

Need...
1,102
Posted By anshaa
i am new to unix, need some method to do the...
i am new to unix, need some method to do the following case.
1,102
Posted By anshaa
Write the lines in one single line
Hi,

I need some iteration to do the following work.

Sample:

ANS|26-Jan-2012|26|MON|12536.1
ANS|26-Jan-2012|26|TUE|2536.1
ANS|26-Jan-2012|26|THUR|789.1
SED|26-Jan-2013|32|MON|258.1...
1,655
Posted By anshaa
Sorry My bad. Thanks the solution works great. ...
Sorry My bad.
Thanks the solution works great.
I used nawk, instead of awk.
1,655
Posted By anshaa
My inital input file was somethign like below : ...
My inital input file was somethign like below :
INPUT

SATURDAY|02-JAN-13|2|ADD|165242.56
SATURDAY|02-JAN-13|2|SUB|1602446.2
SATURDAY|02-JAN-13|2|MULT|109762.97...
1,655
Posted By anshaa
i am using the below sorting order. sort...
i am using the below sorting order.

sort -k1b,1 -k2b,2 -k3b,3 -k4b,4
1,655
Posted By anshaa
Cut the final line of each sorted value
Hi
I have file like the below mentioned example. Need some kind of unix script to achive the output.
Input:

PA|23|2013-01-23|252
PA|23|2013-01-23|264
PA|25|2013-01-22|200
PA|23|2013-01-27|156...
1,543
Posted By anshaa
Posting as Anshaa
User complained they could not post, so testing posting as user.
1,376
Posted By anshaa
i couldnt trace that tread, thats wy opened a new...
i couldnt trace that tread, thats wy opened a new one.
My problem is that i need to remove the space(trailing ones) oly in the second column. It migthe have more than one space in some instances.
i...
1,376
Posted By anshaa
Removing extra unwanted spaces
hi,

i need to remove the extra spaces in the filed.

Sample:

abc~bd ~bkd123 .. 1space
abc~badf ~bakdsf123 .. 2space
abc~bqed ~bakuowe .. 3space


output:

abc~bd ~bkd123 .. 1space...
2,536
Posted By anshaa
Removing extra unwanted spaces
hi,

i need to remove the extra spaces in the 2nd field.

Sample:

abc|bd |bkd123 .. 1space
abc|badf |bakdsf123 .. 2space
abc|bqe |bakuowe .. 3space


Output:

abc|bd|bkd123...
780
Posted By anshaa
Need to replace '\n' with '\n~'
Need to replace '\n' with '\n~'
input

test|123|abcd
te12|258|abdk


output

test|123|abcd~
te12|258|abdk~
772
Posted By anshaa
Cut and minimise the length
hi,

Need unix code to cut the following example. The third filed shuld have oly 10 characters in total

file..

123|test|testing12345612123|break
123|test|testing12378912|break...
2,030
Posted By anshaa
u can ignore that part.. to be precise ...
u can ignore that part.. to be precise

1234|test|8/19/2009||test
1234|test|8/9/2009|8/21/2009|test
1234|test|8/1/2009||test


output..

1234|test|08/19/2009||test...
2,030
Posted By anshaa
if the file is in the below format ...
if the file is in the below format
1234|test|8/19/2009||test
1234|test|8/9/09|8/21/2009|test
1234|test|8/1/86||test
1234|test||8/1/09|test

output..
1234|test|08/19/2009||test...
2,030
Posted By anshaa
Replace the nth column date as MM/DD/YYYY
Hi,
I need some unix command to replace the following thing.
cat test.dat
1234|test|8/19/2009|8/20/2009|test
1234|test|8/9/2009|8/21/2009|test
1234|test|8/1/2009|8/2/2009|test
after processing...
1,641
Posted By anshaa
nawk 'END{print RS} /^[0-9]/{if(NR>1)print RS}1'...
nawk 'END{print RS} /^[0-9]/{if(NR>1)print RS}1' ORS= filename > filename1

Works perfectly.
1,641
Posted By anshaa
i am getting the following error: awk...
i am getting the following error:
awk 'END{print RS} /^[0-9]/{if(NR>1)print RS}1' ORS= AOTSIncdt_tckt_latest3.txt
awk: syntax error near line 1
awk: bailing out near line 1

---------- Post...
1,641
Posted By anshaa
Start the line only with numbers
hi,

I need some unix command to replace the following thing. The line shuld start with oly numbers. If it starts with anything other than number it shuld be taken back to the last line.

My...
Showing results 1 to 20 of 20

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