Try the following queries:
# read all nodes with amenity=atm or atm=yes, ignore ways and relations
osmosis --read-xml data.osm --tf accept-nodes amenity=atm --tf reject-ways --tf reject-relations --write-xml amenity_atm_nodes.osm
osmosis --read-xml data.osm --tf accept-nodes atm=yes --tf reject-ways --tf reject-relations --write-xml atm_yes_nodes.osm
# read all ways with amenity=atm or atm=yes, keep only related nodes, ignore relations
osmosis --read-xml data.osm --tf accept-ways amenity=atm --used-node --tf reject-relations --write-xml amenity_atm_ways.osm
osmosis --read-xml data.osm --tf accept-ways atm=yes --used-node --tf reject-relations --write-xml atm_yes_ways.osm
# read all relations with amenity=atm or atm=yes, keep only related ways and nodes
osmosis --read-xml data.osm --tf accept-relations amenity=atm --used-way --tf accept-relations atm=yes --used-node --write-xml amenity_atm_relations.osm
osmosis --read-xml data.osm --tf accept-relations atm=yes --used-way --tf accept-relations atm=yes --used-node --write-xml atm_yes_relations.osm
# merge all files together
osmosis --rx amenity_atm_nodes.osm --rx atm_yes_nodes.osm \
--rx amenity_atm_ways.osm --rx atm_yes_ways.osm \
--rx amenity_atm_relations.osm --rx atm_yes_relations.osm \
--merge --merge --merge --merge --merge --wx atm.osm
However the second block (the part with the ways) seems to pull in slightly too much data. No idea what I'm doing wrong, maybe someone can fix it. And the syntax is just horrible. Also you can probably speed up things a lot by using pipes instead of calling osmosis again and again for each sub task.
Alternatively you may also think about just using Overpass API. Constructing tag filters with Overpass API is a little simpler and you don't even have to download the whole area beforehand. Here is an example query on overpass turbo:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“amenity=atm or atm=yes in Paris”
*/
[out:json][timeout:25];
// fetch area “Paris” to search in
{{geocodeArea:Paris}}->.searchArea;
// gather results
(
// query part for: “amenity=atm”
node["amenity"="atm"](area.searchArea);
way["amenity"="atm"](area.searchArea);
relation["amenity"="atm"](area.searchArea);
// query part for: “atm=yes”
node["atm"="yes"](area.searchArea);
way["atm"="yes"](area.searchArea);
relation["atm"="yes"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
--tf reject-ways --tf reject-relations
if you want to ignore ways and relations. – scai May 18 '15 at 17:03