Search Results

Search: Posts Made By: pinpe
12,925
Posted By danmero
sort -u file[1,2] > file3 :rolleyes:
sort -u file[1,2] > file3
:rolleyes:
3,459
Posted By radoulov
Manually (and noisy) with awk (without GNU...
Manually (and noisy) with awk (without GNU extensions):

awk -F, 'BEGIN {
split( "JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC", m )
}
{
am = substr( $3, 10, 2) > 12 ? "PM" :...
2,172
Posted By vgersh99
nawk -F'[<>]' '{print $3}' myFile
nawk -F'[<>]' '{print $3}' myFile
1,411
Posted By Shell_Life
Here is one way of doing it: #!/usr/bin/ksh ...
Here is one way of doing it:
#!/usr/bin/ksh
mFrom=$1
mTo=$2
typeset -i mCnt=${mFrom}
while [[ ${mCnt} -ge ${mFrom} && ${mCnt} -le ${mTo} ]]; do
echo "${mCnt}"
mCnt=${mCnt}+1
done

Run...
2,701
Posted By verdepollo
sed "s/.*/My ID Number='&';/" infile Edit:...
sed "s/.*/My ID Number='&';/" infile

Edit: If you have a strict need for awk:

awk -v sq="'" '{print "My ID Number="sq$0sq";"}'
3,868
Posted By guruprasadpr
Hi Not sure why you are getting the error....
Hi

Not sure why you are getting the error. Not able to reproduce the error in which ever shell I tried. An alternate:

sed -e 's/\(.*\)\(.\)/website \1\.\2\.numbers.com/' a | awk 'BEGIN{print...
3,868
Posted By guruprasadpr
Hi $ cat a 111111111111 222222222222 ...
Hi


$ cat a
111111111111
222222222222
333333333333


$ sed 's/\(.*\)\(.\)/website \1\.\2\.numbers.com/' a
website 11111111111.1.numbers.com
website 22222222222.2.numbers.com
website...
Forum: Programming 06-10-2011
6,207
Posted By radoulov
It should be: select value, ...
It should be:


select
value,
count(*) as totalcount
from
pmowner.pinpebasev
where
availableat
between
trunc(sysdate) - 1
and
trunc(sysdate) - 1/24/60/60
group by ...
3,774
Posted By ctsgnb
$ cat tst 500010245623 500...
$ cat tst
500010245623 500 21-APR-11 05.58.21 PM 1
500010245637 500 21-APR-11 05.58.21 PM ...
20,434
Posted By getmmg
perl -0ane...
perl -0ane 'BEGIN{$cols=3;$k=0}END{foreach(@F){$j=sprintf("%03d",++$k);$hash{$j}.= "$_\t";$k=0 if($k == (($#F+1)/$cols))}; for (sort keys %hash){chop($hash{$_});print "$hash{$_}\n"}}' inp
20,434
Posted By getmmg
Problem happened when it was getting sorted. It...
Problem happened when it was getting sorted. It sorts row 1,10...19,then 2,3 etc.,

I have added formatting for rows to fix that

Hope this code will your issue.

perl -0ane...
Showing results 1 to 11 of 11

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