Search Results

Search: Posts Made By: bittoo
6,416
Posted By bittoo
Need to get next valid date from date string
Hi,

I am passing date string of format 'YYYYMMDD' to a ksh script.
Will I be able to get next valid date from the passed in string.

Example I pass '20100228' to the shell script, Is there a...
7,643
Posted By bittoo
thanx guys..tried awk command and working the way...
thanx guys..tried awk command and working the way i want....will try other commands too...
7,643
Posted By bittoo
Search and replace particular characters in fixed length-file
Masters,
I have fixed length input file like FHEAD0000000001XXXX20090901 0000009000Y1000XXX2
THEAD000000000220090901 ITM0000109393813 430143504352N22SP ...
1,963
Posted By bittoo
Hi dennis Brilliant command.. Suppose if...
Hi dennis

Brilliant command..
Suppose if the input is fixed length like

field1<1 space>field2<3 spaces>field3<5spaces>field4<10 spaces>field5

where spaces can vary..
I need output in same...
1,963
Posted By bittoo
Conditional aggregation and print of a column in file
Hi
My input file looks like
field1 field2 field3 field4 field5
field1 field2 field3 field4 field5
field1 field2 field3 field4 field5
::::::::::::
::::::::::::

There may be one space of...
8,307
Posted By bittoo
Thanx fpmurphy and aigles.. Got it worked..
Thanx fpmurphy and aigles.. Got it worked..
1,447
Posted By bittoo
sed -e 's/-/0/g' file.csv should work
sed -e 's/-/0/g' file.csv should work
3,434
Posted By bittoo
Considering /*....*/ as comment, try the...
Considering /*....*/ as comment, try the following code:

cat bb.txt
p3:s1234owerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
ca:3:respawn:/opt/GoldWing/currentPM/local/critagt...
8,307
Posted By bittoo
OK..Lemme be clear, My script: #!/bin/ksh ...
OK..Lemme be clear,
My script:
#!/bin/ksh
compare()
{
cat $1>t1
cat $2>t2
cy1=`cut -f13 -d'Ç' t1`
cy2=`cut -f13 -d'Ç' t2`
if [ $cy1 = $cy2 ]
then
echo "yes"
else
echo "no"
fi
}...
8,307
Posted By bittoo
Can a variable assigned in a shell function be accessed outside
Hi

I have the following script :
#!/bin/ksh
compare()
{
cat $1>t1
cat $2>t2
cy1=`cut -f13 -d'Ç' t1`
cy2=`cut -f13 -d'Ç' t2`
print "cy1 = $cy1"
print "cy2 = $cy2"
if [ $cy1 = $cy2 ]
then...
3,664
Posted By bittoo
awk '{printf "%-164s\n",$0}' old.txt > new.txt .....
awk '{printf "%-164s\n",$0}' old.txt > new.txt .. should do the job..
3,722
Posted By bittoo
VAR=`sqlplus -s username/passwd@sid << END ...
VAR=`sqlplus -s username/passwd@sid << END
set heading off pagesize 0 verify off feedback off echo off
select t.deger from parametre t where t.id=30;
exit;
END`
echo...
3,664
Posted By bittoo
Can u try the above comamnd on ur file and let me...
Can u try the above comamnd on ur file and let me know the result.. If that does not work, let us give a simple input and ur expected output
3,664
Posted By bittoo
Did u mean u need to append spaces for the rest...
Did u mean u need to append spaces for the rest of the line till 165th character...

Then u can adapt

awk '{printf "%-165s\n",$0}' old.txt > new.txt

All lines will be left justified for 165...
2,028
Posted By bittoo
if it is not perl, then use this. cat...
if it is not perl, then use this.

cat abc.txt
timestamp=2009-11-10-04.55.20.829347;
a;
b;
c;
ddaa;

timestamp=2009-11-10-04.55.20.829347;
aa;
bb;
cc;

$cat abc.txt|awk '{if ( $0 ~...
54,537
Posted By bittoo
Ignore this ..Supposed to be in another thread ...
Ignore this ..Supposed to be in another thread

---------- Post updated at 12:24 PM ---------- Previous update was at 12:19 PM ----------

Hi Try this:

Added if ( j != count-1 ) to get next...
16,929
Posted By bittoo
Thanks Scrutinizer....Understood much better now..
Thanks Scrutinizer....Understood much better now..
16,929
Posted By bittoo
Both the commands work perfectly.. Can u guys...
Both the commands work perfectly.. Can u guys please explain
"!$3{A[$2]=$1;next}" part of the command.. Thanx a lot for ur help
16,929
Posted By bittoo
Using grep and cut within awk
Hi

My input file looks like as follows: say a.txt

"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06...
Showing results 1 to 19 of 19

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