Search Results

Search: Posts Made By: posner
10,858
Posted By Yoda
You specified just the MIME header, but the file...
You specified just the MIME header, but the file is not attached!

Here is an example using uuencode for encoding:
echo "Content-Type: image/png"
echo "Content-Disposition: attachment;...
10,858
Posted By Corona688
You didn't actually include the contents of the...
You didn't actually include the contents of the .png in there.

First try:
(
echo "From: $FROM"
echo "To: $TO"
echo "MIME-Version: 1.0"
echo "Subject: $SUBJECT"
echo 'Content-Type:...
3,339
Posted By Chubler_XL
Well you could fetch all the users with a non...
Well you could fetch all the users with a non blank cidx first:

ldapsearch -h server_domain_name -p 389 -D "uid=user,ou=appadm,o=ent" -w PaB -b "ou=roles,o=ent" '(&objectClass=user)(cidx=*))'...
22,578
Posted By jayan_jay
try this.. outputFile="/tmp/out.html" ...
try this..


outputFile="/tmp/out.html"
attachFile="/tmp/attach.html"
(
echo "From: abc@abc.com"
echo "To: abc@abc.com"
echo "Subject: Test"
echo "Mime-Version: 1.0"
echo 'Content-Type:...
4,629
Posted By radoulov
Well, ignoring the timestamp in the last...
Well,
ignoring the timestamp in the last column:

awk -F\| '!key[$1, $2]++' infile
4,629
Posted By pludi
awk -F'|' '!(key[$1$2]){print;key[$1$2]=1}'...
awk -F'|' '!(key[$1$2]){print;key[$1$2]=1}' yourfile
1,143
Posted By Shell_Life
Your "^I" is the "<tab>" character. If you...
Your "^I" is the "<tab>" character.

If you are using "vi":
:%s/<tab>//g

If you are in the unix prompt:
sed 's/<tab>//g' inp_file
1,446
Posted By pravin27
Try this, sed -n '/TO/,/PRO/p' inputfile |...
Try this,

sed -n '/TO/,/PRO/p' inputfile | sed 's/TO//g;s/PRO/-------/g'
1,991
Posted By pravin27
Try this, perl -nle 's/^(\d+\s+|\d)(\D+)/\2...
Try this,

perl -nle 's/^(\d+\s+|\d)(\D+)/\2 \1/g;print $_;' inputfile
1,991
Posted By guruprasadpr
Hi When I run, I am getting the right...
Hi
When I run, I am getting the right output.

Guru
1,452
Posted By ctsgnb
Would be ok if the output order doesn't matter : ...
Would be ok if the output order doesn't matter :
sed 's/\s*###\s*//;s/^\s*//' infile | awk '/^\s*$/{next}!/^[0-9][0-9]*/{B[x]=B[x]?B[x]","$0:$0}/^[0-9][0-9]*/{x=$1;A[$1]=$1" "}END{for(i in A)print...
1,773
Posted By Franklin52
awk '/<s>/{next} /<\/s>/{print s;s="";next}...
awk '/<s>/{next} /<\/s>/{print s;s="";next} {s=length==1?s $0:s?s FS $0:$0}' file
Explanation:
/<s>/{next} | Skip the line with <s>

/<\/s>/{print s;s="";next} | If the line matches with </s>...
2,125
Posted By Scrutinizer
Yes it is probably too cryptic, which is because...
Yes it is probably too cryptic, which is because it was a bit of a challenge to see if it could be done shorter, all in good fun ;) but quite a bit less readable then Radoulov's version..

Anyway....
1,388
Posted By frans
With the GNU date: LIMIT=$(date -d '-8 days'...
With the GNU date:
LIMIT=$(date -d '-8 days' '+%Y/%m/%d')
while IFS='|'; read D L
do [[ $D > $LIMIT ]] && echo "$D|$L"
done < infile
awk:
awk -F'|' -vD=$(date -d '-8 days' '+%Y/%m/%d') '$1 > D'...
6,921
Posted By pravin27
Somrthing like this, awk -F, '{printf...
Somrthing like this,

awk -F, '{printf "%s,%.2f\n",$0,($5/$8*100)}' infile
6,921
Posted By rdcwayx
awk -F, '{printf...
awk -F, '{printf "%s,%s",$0,substr($5/$8*100,2,3)}' urfile

2010-08-18,10,24,.09751,39,7,14872,26732,.14
3,504
Posted By anbu23
sed -n "N;N;s/\n/|/g;p" file ---------- Post...
sed -n "N;N;s/\n/|/g;p" file

---------- Post updated at 02:02 PM ---------- Previous update was at 01:04 PM ----------

paste -d"|" - - - < file

Or

awk ' { ORS=( NR % 3 == 0 ? "\n" : "|" )...
1,873
Posted By guruprasadpr
Hi awk '/id-number/{h=$0" ";i=0;next}...
Hi



awk '/id-number/{h=$0" ";i=0;next} NF{printf h;print;i++;next;}{if (i==0) {printf h;print;}}1' infile


Guru.
1,873
Posted By Scrutinizer
Welcome to the forum. Here is one possibility: ...
Welcome to the forum. Here is one possibility:
awk '/id-number/{h=$0" ";next} NF{printf h}1' infile
Showing results 1 to 19 of 19

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